<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Heckles | Hacks | Hegel ]]></title><description><![CDATA[github.com/siddadel/]]></description><link>https://adelkar.info/</link><image><url>https://adelkar.info/favicon.png</url><title>Heckles | Hacks | Hegel </title><link>https://adelkar.info/</link></image><generator>Ghost 3.38</generator><lastBuildDate>Mon, 09 Mar 2026 20:35:16 GMT</lastBuildDate><atom:link href="https://adelkar.info/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[People's Archive of Rural India (PARI) Coverage on a Map]]></title><description><![CDATA[PARI's articles, faces, albums and images are from rural India. We want to see how much of rural India has PARI covered?]]></description><link>https://adelkar.info/pari-coverage-map/</link><guid isPermaLink="false">5fca216bf2917c11e736f019</guid><category><![CDATA[datascience]]></category><category><![CDATA[Business Intelligence]]></category><category><![CDATA[levenshtein]]></category><category><![CDATA[pari]]></category><category><![CDATA[geojson]]></category><category><![CDATA[geography]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Tue, 08 Dec 2020 12:39:00 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/12/geography.png" medium="image"/><content:encoded><![CDATA[<ul><li>PARI's articles, faces, albums and images are from rural India. We want to see how much of rural India has PARI covered?</li><li>Specifically, which districts of the country have NOT been covered?</li><li>Is there a geographical pattern to our coverage, is there a geographical pattern to our misses?</li><li>Is there a geographical pattern to the Water Crisis, covered extensively by PARI?</li></ul><h3 id="please-go-to-this-github-repository-to-read-the-entire-notebook">Please go to this Github Repository to read the entire notebook</h3><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/Pari-Location-Map.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="People's Archive of Rural India (PARI) Coverage on a Map"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="People's Archive of Rural India (PARI) Coverage on a Map"></div></a></figure><img src="https://adelkar.info/content/images/2020/12/geography.png" alt="People's Archive of Rural India (PARI) Coverage on a Map"><p>To do this we need to map our coverage on a map of India. But we have a problem. The names of location in our database and the names of location in the map from the lovely folks at Datameet have spelling differences. There is therefore a key mismatch in many cases and a lot of important locations are dropped.</p><h2 id="the-transliteration-problem">The Transliteration Problem</h2><p>At PARI we have articles from thousands of locations. Location names in India is a peculiar phenomenon. Here are a few issues that one sees with a location database:</p><p>Indian names are transliterated in a diverse way by people. This is particularly true for Roman transliteration. Although there are international standards for transliteration. Most folks apply the Sir Roger Dowler technique -- Siraj ud Daulah -- that is transliterate by ear. The problem is that a number of Phd theses pervade the space between a Marathi ear and a Punjabi tongue. I mean, each Indian linguistic group has their own perception of what lettes in the English alphabet sound like.</p><p>Odia tongue says Buldhana, the Punjabi ear hears Buldana. The Malayalali tongue says Pathanamtitta, the Malaylayali ear hears Pattanamtitta</p><p>Yours truly has transliterated both with his right Marathi and left Konkani ear. So I don't exactly know what they said. Rest assured Buldhana is in Maharashtra and what I say matters. But then people from Buldhana might disagree. They do.</p><p>And then of course, a number of Bengali tongues scream and shout on whether it is Nilgiris or The Nilgiris (but then that is not a transliteration problem. Or is it? Let's not get into a debate on that. Not with the Bengalis at any rate)</p><p>In addition to Phd theses, between the Punjabi tongue and the Marathi ear also stands the ubiquitous and all powerful Indian bureaucracy. Bureaucrats, as has been shown by paleontologists, are also anatomically, modern homo sapiens. And hence must have their have their own cultural-linuistic backgrounds. Every major institution also has its own cupboards, look-up tables, lexicons, ready reckoners, dialects, jargon and argots. Joke.</p><p>Suffice to say that the Census of India calls Darjeeling what the Election Commission calls Darjiling. The Meterological Department calls Purulia when the Ministry of Human Resources Development calls Puruliya. It is another matter that the HRD ministry might soon be called Department of Education. I digress.</p><p>Allahabad becomes Prayagraj. Gurgaon becomes Gurugram.</p><ul><li>And then there is the problem of taxonomy. Places migrate from districts to other districts. They graduate from a mere district to a full-blown division. Gerrymandering. Redistricting. All that good stuff.</li><li>Besides millions of small hamlets where Dalits and Adivasis live are not recorded at all. They are dismissed as settlements of ostracized communities. How does one spell their names?</li></ul><h2 id="fusion-of-tables">Fusion of Tables</h2><p>If the schwa-conscious Survey of India calls a place Chamarajanagar in the district map of India but the entomologically inclined and etymologically insensitive Department of Horticulture calls it Chamrajnagar, then --the district that was once a part of the larger Mysore district and was formerly called "Sri Arikottara"-- has no chance of appearing on the map of gardens in India. Esepcially if the map is drafted by a machine or a careless cartographer.</p><h2 id="levenshtein-distance">Levenshtein Distance</h2><p>One automated way of matching a string like "Darjeeling" with "Darjiling" is by using edit distance algo called Levenshtein distance. A threshold of 0.8 seems to work okay.</p><!--kg-card-begin: html--><table border="1" class="dataframe" style="box-sizing: unset; border-collapse: collapse; border-spacing: 0px; border: none; color: var(--jp-ui-font-color1); font-size: 12px; table-layout: fixed; margin-left: 0px; margin-right: 0px; margin-bottom: 1em;"><thead style="box-sizing: unset; border-bottom: var(--jp-border-width) solid var(--jp-border-color1); vertical-align: bottom;"><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;"></th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">District 1</th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">District 2</th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">State 1</th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">State 2</th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">Distance</th><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">Decision</th></tr></thead><tbody style="box-sizing: unset;"><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">0</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Kalimpong</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">West Bengal</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.000000</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">no match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-rendermime-table-row-background);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">1</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Nainital</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Uttarakhand</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.000000</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">no match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">2</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Kanchipuram</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Kancheepuram</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Tamil Nadu</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Tamil Nadu</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.869565</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-rendermime-table-row-background);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">3</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Bardhaman</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Barddhaman</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">West Bengal</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">West Bengal</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.947368</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">4</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Howrah</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Haora</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">West Bengal</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">West Bengal</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.666667</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-rendermime-table-row-background);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">...</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">...</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">161</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Ashok Nagar</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Ashoknagar</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Madhya Pradesh</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Madhya Pradesh</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.952381</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-rendermime-table-row-background);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">162</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Reva</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Rewa</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Madhya Pradesh</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Madhya Pradesh</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.750000</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">163</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Mahisagar</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Mahesana</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Gujarat</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Gujarat</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.705882</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-rendermime-table-row-background);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">164</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Kondagaon</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Chhattisgarh</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;"></td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.000000</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">no match</td></tr><tr style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right; background: var(--jp-layout-color0);"><th style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; font-weight: bold; text-align: right;">165</th><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Ramanagara</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Chamrajnagar</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Karnataka</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">Karnataka</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">0.727273</td><td style="box-sizing: unset; vertical-align: middle; padding: 0.5em; line-height: normal; white-space: normal; max-width: none; border: none; text-align: right;">match</td></tr></tbody></table><!--kg-card-end: html--><p>166 rows × 6 columns</p>]]></content:encoded></item><item><title><![CDATA[Deep Fashion]]></title><description><![CDATA[Can a machine imitate the mind of a fashion shopper?
When an retail user views an image of a fashion apparel, her/his/their mind goes through a complex decision making process. ]]></description><link>https://adelkar.info/deepfashion/</link><guid isPermaLink="false">5fbf8ab6f2917c11e736ee43</guid><category><![CDATA[Deep Learning]]></category><category><![CDATA[Retail]]></category><category><![CDATA[Java]]></category><category><![CDATA[Business Intelligence]]></category><category><![CDATA[DL4J]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Mon, 07 Dec 2020 11:00:00 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/11/fashion-5259708_960_720.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://adelkar.info/content/images/2020/11/fashion-5259708_960_720.jpg" alt="Deep Fashion"><p>Imitating the shopper's mind</p><p>This is a work I did more than a year ago. In this post I document very briefly how I pursued a machine learning idea. I started out by using Dl4J a Java based deep learning library. <br><br>I soon realized that the community support (stackoverlow, medium), tools (scikitlearn, matplotlib, numpy) and infrastructure (aws, floydhub) are quite limited. It made more sense to do this in Python.</p><p>I have followed examples of my Java exploration with my jupyter notebooks downloaded from floydhub where they ran.</p><p>This just a sneak preview into the larger codebase. You may go to the Github links to see the code.</p><h3 id="can-a-machine-imitate-the-mind-of-a-fashion-shopper">Can a machine imitate the mind of a fashion shopper?</h3><p>When an retail user views an image of a fashion apparel, her/his/their mind (yes mind, not brain) goes through a complex decision making process. This leads to the decision on whether to buy or pass on the object. Can a neural network imitate this decision making process?</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/11/fashion-5259708_960_720-1.jpg" class="kg-image" alt="Deep Fashion" srcset="https://adelkar.info/content/images/size/w600/2020/11/fashion-5259708_960_720-1.jpg 600w, https://adelkar.info/content/images/2020/11/fashion-5259708_960_720-1.jpg 960w" sizes="(min-width: 720px) 720px"><figcaption>credit: Pixabay</figcaption></figure><h3 id="can-you-predict-the-sales-of-an-apparel-based-on-its-catalog-photograph">Can you predict the sales of an apparel based on its catalog photograph? </h3><p>This is a machine learning project. This is a Java project that uses DL4J neural networks. This project has the code to fetch, clean and create the dataset from a relational database.</p><p>This product is intended as a Business Intelligence software. It uses convolutional neural networks to "look" at images of products and corresponding historical sales data.</p><h3 id="what-if-we-reformulate-this-question-into-a-multilabel-classification-problem">What if we reformulate this question into a multilabel classification problem?</h3><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://github.com/siddadel/deepfashion"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/deepfashion</div><div class="kg-bookmark-description">Can a neural network imitate the mind of a fashion shopper when she/he views the image of a fashion apparel on a website? Can you predict the sales of fashion apparel based on the photograph of th...</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="Deep Fashion"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="Deep Fashion"></div></a><figcaption>Github repository to the DL4J code</figcaption></figure><h3 id="can-a-simple-feed-forward-mlp-do-this"> Can a simple feed forward MLP do this?</h3><p>I started out with DL4J </p><!--kg-card-begin: html--><table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; tab-size: 8; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box;"><td id="LC26" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">					<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">public</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">MultiLayerNetwork</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">getModel</span>() {</td></tr><tr style="box-sizing: border-box;"><td id="L27" class="blob-num js-line-number" data-line-number="27" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC27" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">MultiLayerConfiguration</span> conf <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">NeuralNetConfiguration</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>seed(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">6</span>)</td></tr><tr style="box-sizing: border-box;"><td id="L28" class="blob-num js-line-number" data-line-number="28" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC28" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.activation(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Activation</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>SIGMOID</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>weightInit(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">WeightInit</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>XAVIER</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>updater(<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Sgd</span>(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0.1</span>))</td></tr><tr style="box-sizing: border-box;"><td id="L29" class="blob-num js-line-number" data-line-number="29" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC29" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.l2(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1e-4</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>list()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">494</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L30" class="blob-num js-line-number" data-line-number="30" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC30" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L31" class="blob-num js-line-number" data-line-number="31" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC31" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">2</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L32" class="blob-num js-line-number" data-line-number="32" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC32" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">3</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L33" class="blob-num js-line-number" data-line-number="33" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC33" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">4</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L34" class="blob-num js-line-number" data-line-number="34" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC34" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">5</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">300</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">10</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L35" class="blob-num js-line-number" data-line-number="35" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC35" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">6</span>, <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DenseLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">10</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">3</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L36" class="blob-num js-line-number" data-line-number="36" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC36" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.layer(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">7</span>,</td></tr><tr style="box-sizing: border-box;"><td id="L37" class="blob-num js-line-number" data-line-number="37" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC37" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">										<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">OutputLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>(</td></tr><tr style="box-sizing: border-box;"><td id="L38" class="blob-num js-line-number" data-line-number="38" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC38" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">												<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">LossFunctions</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span><span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">LossFunction</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>MEAN_SQUARED_LOGARITHMIC_ERROR</span>)</td></tr><tr style="box-sizing: border-box;"><td id="L39" class="blob-num js-line-number" data-line-number="39" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC39" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">														.activation(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Activation</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>RELU</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">3</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nOut(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build())</td></tr><tr style="box-sizing: border-box;"><td id="L40" class="blob-num js-line-number" data-line-number="40" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC40" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>								.backprop(true)</span></td></tr><tr style="box-sizing: border-box;"><td id="L41" class="blob-num js-line-number" data-line-number="41" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC41" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>								.pretrain(false)</span></td></tr><tr style="box-sizing: border-box;"><td id="L42" class="blob-num js-line-number" data-line-number="42" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC42" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.build();</td></tr><tr style="box-sizing: border-box;"><td id="L43" class="blob-num js-line-number" data-line-number="43" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC43" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L44" class="blob-num js-line-number" data-line-number="44" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC44" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">MultiLayerNetwork</span> model <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span></td></tr><tr style="box-sizing: border-box;"><td id="L45" class="blob-num js-line-number" data-line-number="45" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC45" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">MultiLayerNetwork</span>(conf);</td></tr><tr style="box-sizing: border-box;"><td id="L46" class="blob-num js-line-number" data-line-number="46" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC46" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>						load("datafashion\\model-amount.txt");</span></td></tr><tr style="box-sizing: border-box;"><td id="L47" class="blob-num js-line-number" data-line-number="47" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC47" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">return</span> model;</td></tr><tr style="box-sizing: border-box;"><td id="L48" class="blob-num js-line-number" data-line-number="48" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC48" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">					}</td></tr></tbody></table><!--kg-card-end: html--><h3 id="can-vgg16-imitate-the-mind-of-a-shopper">Can VGG16 imitate the mind of a shopper?</h3><!--kg-card-begin: html--><table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; tab-size: 8; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box;"><td id="LC55" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">	<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">public</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">void</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">run</span>(<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">String</span>[] <span class="pl-v" style="box-sizing: border-box; color: rgb(227, 98, 9);">args</span>) <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">throws</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Exception</span> {</td></tr><tr style="box-sizing: border-box;"><td id="L56" class="blob-num js-line-number" data-line-number="56" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC56" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		enableCuda();</td></tr><tr style="box-sizing: border-box;"><td id="L57" class="blob-num js-line-number" data-line-number="57" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC57" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre; background-color: var(--color-blob-line-highlight-bg);">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>Load data....<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L58" class="blob-num js-line-number" data-line-number="58" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC58" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">/**</span></span></td></tr><tr style="box-sizing: border-box;"><td id="L59" class="blob-num js-line-number" data-line-number="59" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC59" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">		 * cd Data Setup -&gt; organize and limit data file paths: - mainPath = path to</span></td></tr><tr style="box-sizing: border-box;"><td id="L60" class="blob-num js-line-number" data-line-number="60" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC60" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">		 * image files - fileSplit = define basic dataset split with limits on format -</span></td></tr><tr style="box-sizing: border-box;"><td id="L61" class="blob-num js-line-number" data-line-number="61" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC61" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">		 * pathFilter = define additional file load filter to limit size and balance</span></td></tr><tr style="box-sizing: border-box;"><td id="L62" class="blob-num js-line-number" data-line-number="62" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC62" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">		 * batch content</span></td></tr><tr style="box-sizing: border-box;"><td id="L63" class="blob-num js-line-number" data-line-number="63" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC63" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">		 *<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">*/</span></span></td></tr><tr style="box-sizing: border-box;"><td id="L64" class="blob-num js-line-number" data-line-number="64" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC64" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ParentPathLabelGenerator</span> labelMaker <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ParentPathLabelGenerator</span>();</td></tr><tr style="box-sizing: border-box;"><td id="L65" class="blob-num js-line-number" data-line-number="65" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC65" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">File</span> mainPath <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">File</span>(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>datafashion<span class="pl-cce" style="box-sizing: border-box;">\\</span>images-resize-240-320<span class="pl-cce" style="box-sizing: border-box;">\\</span>Number<span class="pl-cce" style="box-sizing: border-box;">\\</span>resize<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L66" class="blob-num js-line-number" data-line-number="66" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC66" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">FileSplit</span> fileSplit <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">FileSplit</span>(mainPath, <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">NativeImageLoader</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>ALLOWED_FORMATS</span>, rng);</td></tr><tr style="box-sizing: border-box;"><td id="L67" class="blob-num js-line-number" data-line-number="67" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC67" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">int</span> numExamples <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> toIntExact(fileSplit<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>length());</td></tr><tr style="box-sizing: border-box;"><td id="L68" class="blob-num js-line-number" data-line-number="68" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC68" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">int</span> numLabels <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> fileSplit<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>getRootDir()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>listFiles(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">File</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">::</span>isDirectory)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>length; <span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> This only works if your root is</span></td></tr><tr style="box-sizing: border-box;"><td id="L69" class="blob-num js-line-number" data-line-number="69" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC69" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">																					<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> clean: only label subdirs.</span></td></tr><tr style="box-sizing: border-box;"><td id="L70" class="blob-num js-line-number" data-line-number="70" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC70" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">System</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>out<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>println(numLabels);</td></tr><tr style="box-sizing: border-box;"><td id="L71" class="blob-num js-line-number" data-line-number="71" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC71" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">System</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>out<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>println(numExamples);</td></tr><tr style="box-sizing: border-box;"><td id="L72" class="blob-num js-line-number" data-line-number="72" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC72" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L73" class="blob-num js-line-number" data-line-number="73" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC73" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">BalancedPathFilter</span> pathFilter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">BalancedPathFilter</span>(rng, labelMaker, numExamples, numLabels,</td></tr><tr style="box-sizing: border-box;"><td id="L74" class="blob-num js-line-number" data-line-number="74" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC74" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				maxPathsPerLabel);</td></tr><tr style="box-sizing: border-box;"><td id="L75" class="blob-num js-line-number" data-line-number="75" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC75" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L76" class="blob-num js-line-number" data-line-number="76" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC76" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">InputSplit</span>[] inputSplit <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> fileSplit<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>sample(pathFilter, splitTrainTest, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">-</span> splitTrainTest);</td></tr><tr style="box-sizing: border-box;"><td id="L77" class="blob-num js-line-number" data-line-number="77" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC77" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">InputSplit</span> trainData <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> inputSplit[<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0</span>];</td></tr><tr style="box-sizing: border-box;"><td id="L78" class="blob-num js-line-number" data-line-number="78" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC78" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">InputSplit</span> testData <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> inputSplit[<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span>];</td></tr><tr style="box-sizing: border-box;"><td id="L79" class="blob-num js-line-number" data-line-number="79" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC79" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L80" class="blob-num js-line-number" data-line-number="80" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC80" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>Build model....<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L81" class="blob-num js-line-number" data-line-number="81" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC81" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L82" class="blob-num js-line-number" data-line-number="82" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC82" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ZooModel</span> zooModel <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">VGG16</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>builder()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build();</td></tr><tr style="box-sizing: border-box;"><td id="L83" class="blob-num js-line-number" data-line-number="83" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC83" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ComputationGraph</span> vgg16 <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> (<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ComputationGraph</span>) zooModel<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>initPretrained(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">PretrainedType</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>IMAGENET</span>);</td></tr><tr style="box-sizing: border-box;"><td id="L84" class="blob-num js-line-number" data-line-number="84" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC84" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(vgg16<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>summary());</td></tr><tr style="box-sizing: border-box;"><td id="L85" class="blob-num js-line-number" data-line-number="85" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC85" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L86" class="blob-num js-line-number" data-line-number="86" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC86" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> Decide on a fine tune configuration to use.</span></td></tr><tr style="box-sizing: border-box;"><td id="L87" class="blob-num js-line-number" data-line-number="87" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC87" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> In cases where there already exists a setting the fine tune setting will</span></td></tr><tr style="box-sizing: border-box;"><td id="L88" class="blob-num js-line-number" data-line-number="88" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC88" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> override the setting for all layers that are not "frozen".</span></td></tr><tr style="box-sizing: border-box;"><td id="L89" class="blob-num js-line-number" data-line-number="89" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC89" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">FineTuneConfiguration</span> fineTuneConf <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">FineTuneConfiguration</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>()<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>updater(<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Nesterovs</span>(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">5e-5</span>))<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>seed(seed)</td></tr><tr style="box-sizing: border-box;"><td id="L90" class="blob-num js-line-number" data-line-number="90" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC90" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				.build();</td></tr><tr style="box-sizing: border-box;"><td id="L91" class="blob-num js-line-number" data-line-number="91" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC91" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L92" class="blob-num js-line-number" data-line-number="92" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC92" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> Construct a new model with the intended architecture and print summary</span></td></tr><tr style="box-sizing: border-box;"><td id="L93" class="blob-num js-line-number" data-line-number="93" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC93" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ComputationGraph</span> vgg16Transfer <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">TransferLearning</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">GraphBuilder</span>(vgg16)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>fineTuneConfiguration(fineTuneConf)</td></tr><tr style="box-sizing: border-box;"><td id="L94" class="blob-num js-line-number" data-line-number="94" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC94" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				.setFeatureExtractor(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>fc2<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>)</td></tr><tr style="box-sizing: border-box;"><td id="L95" class="blob-num js-line-number" data-line-number="95" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC95" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> the specified layer and below are "frozen"</span></td></tr><tr style="box-sizing: border-box;"><td id="L96" class="blob-num js-line-number" data-line-number="96" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC96" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				.removeVertexKeepConnections(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>predictions<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>)</td></tr><tr style="box-sizing: border-box;"><td id="L97" class="blob-num js-line-number" data-line-number="97" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC97" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				<span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span> replace the functionality of the final vertex</span></td></tr><tr style="box-sizing: border-box;"><td id="L98" class="blob-num js-line-number" data-line-number="98" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC98" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				.addLayer(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>predictions<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>,</td></tr><tr style="box-sizing: border-box;"><td id="L99" class="blob-num js-line-number" data-line-number="99" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC99" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">OutputLayer</span>.<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Builder</span>(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">LossFunctions</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span><span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">LossFunction</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>NEGATIVELOGLIKELIHOOD</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>nIn(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">4096</span>)</td></tr><tr style="box-sizing: border-box;"><td id="L100" class="blob-num js-line-number" data-line-number="100" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC100" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.nOut(numLabels)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>weightInit(<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">NormalDistribution</span>(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0.2</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">*</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">2.0</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">/</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">4096</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">+</span> numLabels))))</td></tr><tr style="box-sizing: border-box;"><td id="L101" class="blob-num js-line-number" data-line-number="101" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC101" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">								.activation(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Activation</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>SOFTMAX</span>)<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>build(),</td></tr><tr style="box-sizing: border-box;"><td id="L102" class="blob-num js-line-number" data-line-number="102" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC102" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">						<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>fc2<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>)</td></tr><tr style="box-sizing: border-box;"><td id="L103" class="blob-num js-line-number" data-line-number="103" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC103" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				.build();</td></tr><tr style="box-sizing: border-box;"><td id="L104" class="blob-num js-line-number" data-line-number="104" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC104" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(vgg16Transfer<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>summary());</td></tr><tr style="box-sizing: border-box;"><td id="L105" class="blob-num js-line-number" data-line-number="105" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC105" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L106" class="blob-num js-line-number" data-line-number="106" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC106" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>		vgg16Transfer.setListeners(new ScoreIterationListener(100));</span></td></tr><tr style="box-sizing: border-box;"><td id="L107" class="blob-num js-line-number" data-line-number="107" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC107" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>		UIServer uiServer = UIServer.getInstance();</span></td></tr><tr style="box-sizing: border-box;"><td id="L108" class="blob-num js-line-number" data-line-number="108" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC108" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>		StatsStorage statsStorage = new InMemoryStatsStorage();</span></td></tr><tr style="box-sizing: border-box;"><td id="L109" class="blob-num js-line-number" data-line-number="109" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC109" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>		uiServer.attach(statsStorage);</span></td></tr><tr style="box-sizing: border-box;"><td id="L110" class="blob-num js-line-number" data-line-number="110" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC110" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"><span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);">//</span>		vgg16Transfer.setListeners(new StatsListener(statsStorage), new ScoreIterationListener(1));</span></td></tr><tr style="box-sizing: border-box;"><td id="L111" class="blob-num js-line-number" data-line-number="111" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC111" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		</td></tr><tr style="box-sizing: border-box;"><td id="L112" class="blob-num js-line-number" data-line-number="112" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC112" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ImageRecordReader</span> recordReader <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ImageRecordReader</span>(height, width, channels, labelMaker);</td></tr><tr style="box-sizing: border-box;"><td id="L113" class="blob-num js-line-number" data-line-number="113" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC113" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DataSetIterator</span> trainIter;</td></tr><tr style="box-sizing: border-box;"><td id="L114" class="blob-num js-line-number" data-line-number="114" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC114" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		recordReader<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>initialize(trainData, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">null</span>);</td></tr><tr style="box-sizing: border-box;"><td id="L115" class="blob-num js-line-number" data-line-number="115" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC115" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		trainIter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">RecordReaderDataSetIterator</span>(recordReader, batchSize, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span>, numLabels);</td></tr><tr style="box-sizing: border-box;"><td id="L116" class="blob-num js-line-number" data-line-number="116" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC116" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L117" class="blob-num js-line-number" data-line-number="117" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC117" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		recordReader <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">ImageRecordReader</span>(height, width, channels, labelMaker);</td></tr><tr style="box-sizing: border-box;"><td id="L118" class="blob-num js-line-number" data-line-number="118" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC118" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">DataSetIterator</span> testIter;</td></tr><tr style="box-sizing: border-box;"><td id="L119" class="blob-num js-line-number" data-line-number="119" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC119" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		recordReader<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>initialize(testData, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">null</span>);</td></tr><tr style="box-sizing: border-box;"><td id="L120" class="blob-num js-line-number" data-line-number="120" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC120" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		testIter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">new</span> <span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">RecordReaderDataSetIterator</span>(recordReader, batchSize, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">1</span>, numLabels);</td></tr><tr style="box-sizing: border-box;"><td id="L121" class="blob-num js-line-number" data-line-number="121" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC121" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L122" class="blob-num js-line-number" data-line-number="122" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC122" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">Evaluation</span> eval;</td></tr><tr style="box-sizing: border-box;"><td id="L123" class="blob-num js-line-number" data-line-number="123" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC123" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		eval <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> vgg16Transfer<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>evaluate(testIter);</td></tr><tr style="box-sizing: border-box;"><td id="L124" class="blob-num js-line-number" data-line-number="124" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC124" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>Eval stats BEFORE fit.....<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L125" class="blob-num js-line-number" data-line-number="125" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC125" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(eval<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>stats() <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">+</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span><span class="pl-cce" style="box-sizing: border-box;">\n</span><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L126" class="blob-num js-line-number" data-line-number="126" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC126" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		testIter<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>reset();</td></tr><tr style="box-sizing: border-box;"><td id="L127" class="blob-num js-line-number" data-line-number="127" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC127" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L128" class="blob-num js-line-number" data-line-number="128" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC128" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">int</span> iter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0</span>;</td></tr><tr style="box-sizing: border-box;"><td id="L129" class="blob-num js-line-number" data-line-number="129" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC129" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">while</span> (trainIter<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>hasNext()) {</td></tr><tr style="box-sizing: border-box;"><td id="L130" class="blob-num js-line-number" data-line-number="130" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC130" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">			vgg16Transfer<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>fit(trainIter<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>next());</td></tr><tr style="box-sizing: border-box;"><td id="L131" class="blob-num js-line-number" data-line-number="131" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC131" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">			<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">if</span> (iter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">%</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">10</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">==</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">0</span>) {</td></tr><tr style="box-sizing: border-box;"><td id="L132" class="blob-num js-line-number" data-line-number="132" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC132" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>Evaluate model at iter <span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">+</span> iter <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">+</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span> ....<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L133" class="blob-num js-line-number" data-line-number="133" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC133" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				eval <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">=</span> vgg16Transfer<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>evaluate(testIter);</td></tr><tr style="box-sizing: border-box;"><td id="L134" class="blob-num js-line-number" data-line-number="134" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC134" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(eval<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>stats());</td></tr><tr style="box-sizing: border-box;"><td id="L135" class="blob-num js-line-number" data-line-number="135" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC135" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">				testIter<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>reset();</td></tr><tr style="box-sizing: border-box;"><td id="L136" class="blob-num js-line-number" data-line-number="136" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC136" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">			}</td></tr><tr style="box-sizing: border-box;"><td id="L137" class="blob-num js-line-number" data-line-number="137" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC137" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">			iter<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">++</span>;</td></tr><tr style="box-sizing: border-box;"><td id="L138" class="blob-num js-line-number" data-line-number="138" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC138" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		}</td></tr><tr style="box-sizing: border-box;"><td id="L139" class="blob-num js-line-number" data-line-number="139" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC139" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">
</td></tr><tr style="box-sizing: border-box;"><td id="L140" class="blob-num js-line-number" data-line-number="140" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC140" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">		log<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">.</span>info(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);"><span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span>Model build complete<span class="pl-pds" style="box-sizing: border-box; color: rgb(3, 47, 98);">"</span></span>);</td></tr><tr style="box-sizing: border-box;"><td id="L141" class="blob-num js-line-number" data-line-number="141" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; line-height: 20px; color: var(--color-diff-blob-num-text); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC141" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 12px; color: var(--color-text-primary); overflow-wrap: normal; white-space: pre;">	}</td></tr></tbody></table><!--kg-card-end: html--><h2 id="python-keras">Python &amp; Keras</h2><p>Hang on, Java is just to cumbersome for such experimentation.  It's a bit inconvenient. Let's try this in Python. We can deploy an enterprise level system in Java later.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/Deep-Fashion-Python"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/Deep-Fashion-Python</div><div class="kg-bookmark-description">Contribute to siddadel/Deep-Fashion-Python development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="Deep Fashion"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="Deep Fashion"></div></a></figure><h2 id="inception">Inception</h2><p>Turns out that Inception gives a better result over VGG16. It appears that the network can tell if a product WILL NOT do well. But it can not tell if it can do well.<br><br>Notice the Precision and Recall of "False" or 0" are relatively high.</p><h2 id="inception-plus-other-data-points">Inception plus Other Data points</h2><p>When you add other data points such as price, there is some improvement. Yet, it is a good negative guesser. It can guess what the shopper does not like.</p><h2 id="only-data-points">Only Data Points?</h2><p>Oddly, even just the tabular db data and no images also yield acceptable result. Is this just a simple logistical regression problem? Is the shopper that predictable?</p><p>Please read the code for detailed exploration. I have no added my other visualizations. I do not want to reveal the retail chain whose images and data I am using. Nor do I want to make public the data set.</p>]]></content:encoded></item><item><title><![CDATA[News Similarity Problem - NER solution]]></title><description><![CDATA[How does one know if two news items have the same story? 
This is a problem for news aggregators. Multiple sources supply news content that are paraphrases of each other. ]]></description><link>https://adelkar.info/news-similarity-problem/</link><guid isPermaLink="false">5fcd233cf2917c11e736f10d</guid><category><![CDATA[NLP]]></category><category><![CDATA[Paraphrases]]></category><category><![CDATA[News]]></category><category><![CDATA[News Similarity]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Sun, 06 Dec 2020 19:18:27 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/12/news-similarity.png" medium="image"/><content:encoded><![CDATA[<img src="https://adelkar.info/content/images/2020/12/news-similarity.png" alt="News Similarity Problem - NER solution"><p>How does one know if two news items have the same story? </p><p>This is a problem for news aggregators. Multiple sources supply news content that are paraphrases of each other. One major news event and the screen is inundated with the same story, in different words. In fact thanks to Reuters, AP and other news agencies, most sources would print the same copy verbatim.</p><p>Can an algorithm identify news items that are paraphrases of each other? </p><p>I try out an NLP concept called Named Entity Recognition. The assumption is that if two stories have the name of the same person(s) and organization(s), is referring to the same event, is quoting the same numbers and so on, and so forth, then it is highly likely that the two stories are paraphrases of each other.</p><p>Ideally, we would create a dataset of a 100,000 pairs of similar and dissimilar stories and run supervised learning on it. </p><p>I have tried to formulate this problem as a binary classification and multi-label classification machine learninig problem:</p><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://adelkar.info/news-similariry-ml/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">News Similarity — a Binary Classification Problem</div><div class="kg-bookmark-description">Problem StatementGiven a pair of news items — Ni and Nj, we want to know if Ni and Nj are talkingabout the same event/thing/news.Say we have a large set N of 10,000 news items. And create 10,000C2 pairs of(Ni, Nj) such that i,j are between 0, 10,000. Our problem statement is to comeup with a fu…</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity Problem - NER solution"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/similarity.png" alt="News Similarity Problem - NER solution"></div></a><figcaption>0</figcaption></figure><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://adelkar.info/news-item-similarity-as-a-multi-label-one-hot-classification-problem/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">News Similarity - a Multilabel Classification Problem</div><div class="kg-bookmark-description">ForewordIn the previous post [/news-similariry-ml/], News Similarity — a Binary Classification ProblemProblem StatementGiven a pairof news items — Ni and Nj, we want to know if Ni and Nj are talkingabout thesame event/thing/news.Say we have a large set N of 10,000 news items. Andcreate10,000C…</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity Problem - NER solution"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/simmilarity2-2.png" alt="News Similarity Problem - NER solution"></div></a></figure><p>But we don't have such a dataset. It takes some investment and human power to create this. Meanwhile, what do we do? We engineer a heuristic technique. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/12/image-4.png" class="kg-image" alt="News Similarity Problem - NER solution" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-4.png 600w, https://adelkar.info/content/images/2020/12/image-4.png 811w" sizes="(min-width: 720px) 720px"><figcaption>a heuristic function over a weighted intersection</figcaption></figure><p>Try this out, this is a simple web flask application. You input two news stories and it predicts whether two stories are paraphrases of each other</p><figure class="kg-card kg-image-card kg-width-full"><img src="https://adelkar.info/content/images/2020/12/image-5.png" class="kg-image" alt="News Similarity Problem - NER solution" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-5.png 600w, https://adelkar.info/content/images/size/w1000/2020/12/image-5.png 1000w, https://adelkar.info/content/images/size/w1600/2020/12/image-5.png 1600w, https://adelkar.info/content/images/2020/12/image-5.png 1893w"></figure><figure class="kg-card kg-image-card"><img src="https://adelkar.info/content/images/2020/12/image-6.png" class="kg-image" alt="News Similarity Problem - NER solution" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-6.png 600w, https://adelkar.info/content/images/2020/12/image-6.png 674w"></figure><p>Please find the code below</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/NewsCompareWeb.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="News Similarity Problem - NER solution"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="News Similarity Problem - NER solution"></div></a></figure><h2 id="in-the-following-code-we-use-news-api-that-scrapes-through-major-news-sources-">In the following code we use News API that scrapes through major news sources. </h2><p>We scrape through news api and generate daily groups of similar news stories.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/News%20Groups%20Creator.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="News Similarity Problem - NER solution"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="News Similarity Problem - NER solution"></div></a></figure><p>In this code I use <em>en_core_web_sm</em></p><blockquote>nlp = spacy.load("en_core_web_sm")</blockquote><p>In the produciton code I use <em>en_core_web_md</em></p><p><em>en_core_web_sm </em> does not have any word vectors and the vector similarity bit does not work. This has an impact on the accuracy.</p><p>For one company, I created a benchmark dataset of 200 pairs of news items. I was able to demonstrate the following metrics on that test data.</p><p><strong>(Accuracy = 87%, precision = 79%, recall = 89%)</strong></p>]]></content:encoded></item><item><title><![CDATA[PARI Translation Memory]]></title><description><![CDATA[A translation memory makes it easier for new translators to use the same terms and abide by the idiom set by previous translators.]]></description><link>https://adelkar.info/pari-tm/</link><guid isPermaLink="false">5fcbe702f2917c11e736f082</guid><category><![CDATA[NLP]]></category><category><![CDATA[translation]]></category><category><![CDATA[TM]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Sat, 05 Dec 2020 20:30:39 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/12/trans.png" medium="image"/><content:encoded><![CDATA[<img src="https://adelkar.info/content/images/2020/12/trans.png" alt="PARI Translation Memory"><p>People's Archive of Rural India (PARI) has a rich database of translated content, created by a superb team of translators that is led by Smita Khator. Talented linguists and writers such as Qamar Tabrez and Medha Khale translate PARI's English content into major Indian languages.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/12/PARI_DataStudio_demo-1.png" class="kg-image" alt="PARI Translation Memory" srcset="https://adelkar.info/content/images/size/w600/2020/12/PARI_DataStudio_demo-1.png 600w, https://adelkar.info/content/images/size/w1000/2020/12/PARI_DataStudio_demo-1.png 1000w, https://adelkar.info/content/images/size/w1600/2020/12/PARI_DataStudio_demo-1.png 1600w, https://adelkar.info/content/images/size/w2400/2020/12/PARI_DataStudio_demo-1.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>PARI's translation report (Google Data Studio)</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/12/PARI_DataStudio_demo-2.png" class="kg-image" alt="PARI Translation Memory" srcset="https://adelkar.info/content/images/size/w600/2020/12/PARI_DataStudio_demo-2.png 600w, https://adelkar.info/content/images/size/w1000/2020/12/PARI_DataStudio_demo-2.png 1000w, https://adelkar.info/content/images/size/w1600/2020/12/PARI_DataStudio_demo-2.png 1600w, https://adelkar.info/content/images/size/w2400/2020/12/PARI_DataStudio_demo-2.png 2400w" sizes="(min-width: 720px) 720px"><figcaption>Translation rate has increased rapidly over the years. The team is getting bigger and diverse. (Google Data Studio)</figcaption></figure><p>Can we build a translation memory to make it easier for new translators to use the same terms and abide by the idiom set by previous translators? </p><p><em>Special thanks to linguist, Dr. Qamar Tabrez, PARI's prolific Hindi and Urdu translator for this superb idea.</em></p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/12/image-2.png" class="kg-image" alt="PARI Translation Memory" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-2.png 600w, https://adelkar.info/content/images/size/w1000/2020/12/image-2.png 1000w, https://adelkar.info/content/images/size/w1600/2020/12/image-2.png 1600w, https://adelkar.info/content/images/2020/12/image-2.png 1793w"><figcaption>Can we build a translation memory to make it easier for new translators to use the same terms and abide by the idiom set by previous translators?&nbsp;</figcaption></figure><p>First let's cache language paragraphs on local storage. The query is quite heavy and we don't want to hit the database frequently during our experiments.  For shicks &amp; giggles I thought it'd be a good idea to do this in Java. It isn't. Don't try this at home. Do it in Python. Much simpler.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-NLP-Java/blob/master/src/main/java/ruralindiaonline/nlp/TranslatedContentDownloader.java"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-NLP-Java</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-NLP-Java development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="PARI Translation Memory"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="PARI Translation Memory"></div></a></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://adelkar.info/content/images/2020/12/image-1.png" class="kg-image" alt="PARI Translation Memory" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-1.png 600w, https://adelkar.info/content/images/2020/12/image-1.png 715w"><figcaption>A folder for PARI's 14 languages. Inside the folder are text paragraphs in that language</figcaption></figure><p>Now as have a directory of text files with paragraphs of text.</p><p>Now create csv file from these files to juxtapose paragraphs that correspond to translations of each other. </p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://adelkar.info/content/images/2020/12/image-3.png" class="kg-image" alt="PARI Translation Memory" srcset="https://adelkar.info/content/images/size/w600/2020/12/image-3.png 600w, https://adelkar.info/content/images/size/w1000/2020/12/image-3.png 1000w, https://adelkar.info/content/images/2020/12/image-3.png 1151w"></figure><p>Please see the entire code here:</p><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/pari-nlp.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="PARI Translation Memory"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="PARI Translation Memory"></div></a><figcaption>Python code for juxtaposing translated paragraphs</figcaption></figure><p>Now all that remains is to create a Wagtail plugin or even a Chrome plugin for the web user to find the relevant paragraphs where one can find the perfect translation of a word.</p><p>Some questions that I wish to answer are: </p><!--kg-card-begin: markdown--><ul>
<li>
<p>Are 4550 Hindi/Urdu paragraph pairs a large enough dataset to train a transformer network for transliterating/translating between Urdu and Hindi?They are after all two registers of the same language.</p>
</li>
<li>
<p>Can this dataset be used to compute a kind of distance between languages that can corroborate the lexcical and syntactic similarities between languages of the same linguistic group?</p>
</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[News Similarity — a Binary Classification Problem]]></title><description><![CDATA[<h1 id="problem-statement">Problem Statement</h1><p>Given a pair of news items — Ni and Nj, we want to know if Ni and Nj are talking about the same event/thing/news.<br>Say we have a large set N of 10,000 news items. And create 10,000C2 pairs of (Ni, Nj) such that i,</p>]]></description><link>https://adelkar.info/news-similariry-ml/</link><guid isPermaLink="false">5fcd3278f2917c11e736f157</guid><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Sat, 05 Dec 2020 19:42:00 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/12/similarity.png" medium="image"/><content:encoded><![CDATA[<h1 id="problem-statement">Problem Statement</h1><img src="https://adelkar.info/content/images/2020/12/similarity.png" alt="News Similarity — a Binary Classification Problem"><p>Given a pair of news items — Ni and Nj, we want to know if Ni and Nj are talking about the same event/thing/news.<br>Say we have a large set N of 10,000 news items. And create 10,000C2 pairs of (Ni, Nj) such that i,j are between 0, 10,000. Our problem statement is to come up with a function f, such that<br>f(Ni, Nj) = 0, 1 — where 0 is the output where Ni and Nj are dissimilar and Ni and Nj are the similar news items.<br>Alternativelyf(Ni, Nj) = p — where 0&lt;=p&lt;=1 and p is the strength of similarity/probability that they are similar news items</p><figure class="kg-card kg-image-card"><img src="https://paper-attachments.dropbox.com/s_734425EC4E3C43DED894F8CB6CE0D5549E8FC73F01ADE87A2CA88071E67BBA6C_1598559182272_image.png" class="kg-image" alt="News Similarity — a Binary Classification Problem"></figure><p>A more nuanced approach would be to treat this as a multi-label classification problem. This would also mean a more sophisticated training data set. But this discussion is in the next post:</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://adelkar.info/news-item-similarity-as-a-multi-label-one-hot-classification-problem/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">News Similarity - a Multilabel Classification Problem</div><div class="kg-bookmark-description">ForewordIn the previous post [/news-similariry-ml/], I had proposed that we frame ournews item grouping and similarity problem as a Binary Classification problemwhere news items are classified using various techniques of Semantic TextualSimilarity (STS). I had propose a 2 broad approaches: 1.…</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity — a Binary Classification Problem"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/simmilarity2-2.png" alt="News Similarity — a Binary Classification Problem"></div></a></figure><p>Incidentally, I have solved this problem without any explicit supervised learning (word vectors from commercial NLP libraries have been used) engineering a heuristic method that works fairly okay but not perfectly. Check it out here:</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://adelkar.info/news-similarity-problem/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">How does one know if two news items have the same story?</div><div class="kg-bookmark-description">How does one know if two news items have the same story? This is a problem for news aggregators. Multiple sources supply news content that are paraphrases of each other.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity — a Binary Classification Problem"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/news-similarity.png" alt="News Similarity — a Binary Classification Problem"></div></a></figure><h1 id="problem-of-machine-learning">Problem of Machine Learning?</h1><p>Machine Learning is typically used to obtain such a function f. Machine learning is in fact a science that gives us a function, given a huge training data of sample input and output.If f(x) = y. ML finds out “f” given x,y<br>However, we could also solve this heuristically — just come up with our own engineered function something like (0.8 * (number of common words)<em>+0.9 * (number of common people referred)/5</em> which gives an output 0→1 <br>Or even an algorithmic functiondef f(Ni, Nj):</p><p>if (date in Ni == date in Bj): <br>return 0<br>else:<br>return 1<br>The promise and proposition of Machine Learning techniques is that statistical methods can give better accuracy than the above heuristic and/or logical methods.<br></p><h1 id="supervised-or-unsupervised-learning">Supervised or Unsupervised Learning</h1><p>Do we know the output we are interested in? Yes we do. We know what we are looking for — namely, <em>Similarity</em>. Let's say we give 2 news items to a human being. Can she confidently tell if the two news items are similar? YES! Thus this is clearly a problem of Supervised Learning. <br>If, in stead we just had a corpus of 10,000 news items and we did not know what we are looking for. We just wanted some patterns/clusters in this corpus then it would be a problem of unsupervised learning. An unsupervised clustering could lead us to any form of clusters — not necessary that of semantic similarity. It could be clusters based on Voice, on Category, on Style, on number of words, on Complexity, on syllables used. The possibilities are endless.</p><figure class="kg-card kg-image-card"><img src="https://static.javatpoint.com/tutorial/machine-learning/images/supervised-machine-learning.png" class="kg-image" alt="News Similarity — a Binary Classification Problem"></figure><p><br>Moreover most of the time we don’t know what the cluster returned by a K-means or a hierarchical clustering algo — even means. It will just return sets of news items and claim they are similar. But in what way? That a human being will discover on examination of these clusters. <br>But we already know what kind of clusters we want — that of semantic similarity. We care about a specific kind of similarity — is the news item referring to the same story as the other. So why do unsupervised learning and clustering? We know what we are looking for — we shall supervise the learning.<br>The simple question to ask is — do we have labels? Yes, we do — Similar/Dissimilar. These are the labels. This is what we want to predict. If we have labels, the problem is supervised.<br>Thus it is a problem of supervised learning.<br>It is a problem of<strong><em> binary classification.</em></strong></p><h1 id="problem-statement-of-supervised-learning">Problem Statement of Supervised Learning</h1><p>Given a large dataset of the tuples(Ni, Nj, p) — where p is 0 or 1Run a supervised learning algorithm such that we obtain a function such that if two new news items Nk, Nm, are entered into a function then it should correctly predict whether they are similar or dissimilar.<br>Our thesis is that there exists such a function in the world such thatf(Ni, Nj) = p , where p is 0 or 1We are on a quest of this f.<br>Ofcourse there exists such a function. Our human being in the above example employed it in his brain. Our algo needs to immitate her. It will be worthwhile to pause and think why the human being thinks the two news items are referring to the same thing? If you ask you might receive answers such as —The same date, organizations, people, locations, events are referred to in both. Let's make a note of this. We might need this later in our discussion of feature extraction. <br>This formulation thus becomes a<strong><em> binary classification problem.</em></strong><br>Supervised ML promises to procure this f if we supply it with enough data points of (Ni, Nj, p)</p><hr><p>How do we create a large enough training data set for our learner?</p><h1 id="data-set-creation">Data set creation</h1><p>Ideally if we would find a ready made data set such that we have a large corpus of news items pairs it would be ideal. Let’s look online to see if there is any such data set available?<br>To find datasets for our purposes we will need to find out if</p><ul><li>this problem has already been done by some one else?</li><li>a similar problem that is reducible to this problem has been done by someone else?</li><li>is there a larger field of science dedicated to this kind of problems.</li></ul><p><br>Turns out that<strong><em> Semantic Textual Similarity (STS) </em></strong>is famous set of problems that has a lot of industrial applications. Our problem is one of them. Which are the others?</p><ul><li>Paraphrasing</li><li>Page ranking and search</li><li>Plagiarism testing</li></ul><p><br>All these problems need a similar if not the same dataset. <br><a href="https://github.com/brmson/dataset-sts">https://github.com/brmson/dataset-sts</a><br><a href="https://github.com/brmson/dataset-sts/tree/master/data/sts">https://github.com/brmson/dataset-sts/tree/master/data/sts</a><br><br><br><a href="http://alt.qcri.org/semeval2014/task3/index.php?id=data-and-tools" rel="noreferrer nofollow noopener">http://alt.qcri.org/semeval2014/task3/index.php?id=data-and-tools</a><br>A standard benchmarked corpus for STS is this:<a href="https://nlp.stanford.edu/projects/snli/" rel="noreferrer nofollow noopener">https://nlp.stanford.edu/projects/snli/</a><br><br>We could even start of with a neural network built on these datasets and then “transfer” the learning to our dataset.<br></p><h2 id="building-our-own-dataset-a-dataset-from-news-">Building our own dataset — A dataset from NEWS!</h2><p>There is no substitute to getting the training data from exactly the same pool from where your live examples will come. So irrespective of whether we find a good general dataset that helps us tune our learner to getting textual similarity, we certainly need to train our learner to news data — specifically our sources (moneycontrol, times etc)<br>Has anyone already done this?</p><h1 id="my-proposal-for-data-set-creation">My proposal for data set creation</h1><ol><li>What we do is take 100 news stories</li><li>Find 5 versions of each of the story. We have 500 stories.</li><li>We create all possible pairs of 2. 500 C 2 = 500*499/2 = 1,24,750 pairs. That is a hell lot of a training data.</li><li>Of these, 100 * (5 C 2) = 100 * 5 * 4 /2 = 1000 pairs are SIMILAR news stories and the rest 1,00,000 pairs are dissimilar.</li><li>We could balance the data by throwing out half of the dissimilar pairs.</li></ol><p><br>Here is a way to operationalize this:We identify 5 volunteers. Each volunteer is given a date range say April 2019 to one, May 2020 to another. He needs to create a spreadsheet with the following columns<br>Story title1, Content 1, Date of Pub 1, Story title2, Content 2, Date of Pub 2, …. Story title5, Content 5, Date of Pub 5, <br>Create 20 such quintuplets. If 5 people do this. You will have 100 stories with 5 paraphrased reports of each. 500 stories in all. From these a huge dataset can be constructed as shown in the beginning of this section. <br>If we find more than 5 volunteers… the more the merrier. <br>Voila we have our dataset for supervised learning.<br>A word of caution: a dataset based in just 100 real life events might bias the algo towards the words and terms in those 100 stories. It will be better if care is taken that our volunteers choose very diverse stories.</p><h1 id="alternative-crowd-sourcing">Alternative — Crowd-sourcing</h1><p>Alternatively we could use our own app as a dataset creator — where we ask our users to tell us if two news articles are similar or not. We incentivize this and in a couple of months create a training dataset of the nature we want.<br>We could also create user interface of such a form that the user ends up putting two news items together and unwittingly informing our backend which logs it into our training dataset.<br></p><hr><p><br>We have our training data. Now let’s start learning</p><h1 id="feature-extraction">Feature Extraction</h1><p>So far we have treated the news items Ni , Nj as some kind of a monolithic symbols. But they aren’t. They are English strings of non-specific length — with words. And moreover, with linguistic features. <br>At the lowest level they are alphabets. But a level higher they are words. A level even higher is that they are nouns, verbs and such grammatical structures - “parts of speech”. But even one more level higher, they are organizations, events, people, numbers, <br></p><figure class="kg-card kg-image-card"><img src="https://paper-attachments.dropbox.com/s_734425EC4E3C43DED894F8CB6CE0D5549E8FC73F01ADE87A2CA88071E67BBA6C_1598559433763_image.png" class="kg-image" alt="News Similarity — a Binary Classification Problem"></figure><p><br>A learning algo , if fed, these features of Ni and Nj, will perhaps be able to decide the similarity in a better way than perhaps a simple string.<br>Isn't that how human beings instinctively distinguish? They see that both stories are talking about Dhirbhai, Reliance, in Mumbai on 28th Aug. Chances are they are the same. <br>But how do we extract such features? This technique is known as Linguistic Feature Entity linking. Every standard NLP package such as NLTK, Apache OpenNLP and others have "part of speech taggers". These can be used alongside many high performing linguistic feature learning algos to extract such features. <br><br>We need not reinvent the wheel. A large number of commercial packages such as Spacy, Google's NLP engine have already done this tagging for us. We need to do cost-benefit analysis of these. <a href="https://spacy.io/usage/linguistic-features#named-entities">https://spacy.io/usage/linguistic-features#named-entities</a><br><br>Here is an example use of this package to extract organization, event, people info from the text</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/News%20Groups%20Creator.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="News Similarity — a Binary Classification Problem"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="News Similarity — a Binary Classification Problem"></div></a></figure><p><br>Thus for every Ni we can extract the organizations, dates, numerals, money, people and events mentioned in the paragraph We do the same for Nj<br>And we not only supply Ni and Nj but also supply these to the learner — or perhaps only these and not the actual news item.</p><h1 id="feature-vectors-word-vectors">Feature Vectors → Word Vectors</h1><p>In stead of feeding the entire news item, we could just feed the learner with the word vectors of the organization, person, date, geopolitical entity (location) extracted from the text. A word vector is a matrix (vector) representation of a word. <br></p><figure class="kg-card kg-image-card"><img src="https://developers.google.com/machine-learning/crash-course/images/linear-relationships.svg" class="kg-image" alt="News Similarity — a Binary Classification Problem"></figure><p><br></p><h1 id="news-vector-paragraph-vectors-doc2vec-">News Vector → Paragraph Vectors (Doc2Vec)</h1><p>Imagine if every paragraph could be represented by a vector such that the lesser the distance between that vector and another paragraph vector, the closer it is to that paragraph in meaning.If we can create paragraph vectors for each of our news item then that can be one important and perhaps only input to our learner.<br>We could use a ready to use paragraph vectoring api — if there is one — or create our own.<br><a href="https://spacy.io/usage/vectors-similarity">https://spacy.io/usage/vectors-similarity</a><br><br></p><h2 id="gensim">Gensim</h2><p>There are other industry standards for Doc2Vec such as Gensim<br><a href="https://www.tutorialspoint.com/gensim/gensim_doc2vec_model.htm" rel="noreferrer nofollow noopener">https://www.tutorialspoint.com/gensim/gensim_doc2vec_model.htm</a><br>We can use Gensim to create vectors out of our news stories.<br>Alternatively, a lot of others have tried out Doc2Vec implementations. We can start with one and then engineer better and better ones.E.g.<a href="https://www.kaggle.com/alyosama/doc2vec-with-keras-0-77" rel="noreferrer nofollow noopener">https://www.kaggle.com/alyosama/doc2vec-with-keras-0-77</a><br></p><hr><h1 id="learning-architecture">Learning architecture?</h1><p>We will need to try out various architectures from neural networks such as LSTMs, to simpe MLP (FCN) to Random Forrests and even perhaps simple logistical regression.<br>This is after all a binary classification problem.</p><h1 id="semi-learning-alternatives">Semi-learning Alternatives</h1><p>If you don’t have a large dataset and are finding it hard to create one. There is a quick and rough solution. Use paragraph vectors, feature extraction and manually engineer a heuristic function just by “looking” at the values.<br></p><ol><li>calculate the distance between the paragraph vectors</li></ol><ul><li>distance( V(Ni) , V(Nj) ) = d</li></ul><ol><li>Find number of common organizations — o, people — n , date — t , event — e, numerals — l.</li><li>And create a dirty, rough, guess-work, trial n error, heuristic function</li><li>if (d &lt; 0.7 &amp; o &gt;3 &amp; n &gt;7 ….) then return 1 else return 0</li></ol><p><br>It could even be as simple as:if more than 80% organizations mentioned are matching, if more 75% of persons mentioned are matching, if more than 90% of the GPEs are matching and the date of publication is 1,2 days near then it is the same article.<br>This is not supervised machine learning. The Paragraph Vector creation is the only learning bit in this solution. But it might just work!<br>Here is an example of what I mean by this. This is Python code that has given some interesting results (please look at the CSV)</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/siddadel/PARI-Data-Science/blob/master/News%20Groups%20Creator.ipynb"><div class="kg-bookmark-content"><div class="kg-bookmark-title">siddadel/PARI-Data-Science</div><div class="kg-bookmark-description">Contribute to siddadel/PARI-Data-Science development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="News Similarity — a Binary Classification Problem"><span class="kg-bookmark-author">siddadel</span><span class="kg-bookmark-publisher">GitHub</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://avatars1.githubusercontent.com/u/6252597?s&#x3D;400&amp;v&#x3D;4" alt="News Similarity — a Binary Classification Problem"></div></a></figure><h1 id="metric-of-quality">Metric of Quality</h1><p>How do we measure the quality of our result? There are various ways in which machine learning/prediction results are measured.</p><ol><li>Accuracy</li><li>Precision</li><li>Recall</li><li>F1 score.</li></ol><p><br>Which of these four metrics to apply depends on what matters to us most — maximizing true positives? minimizing false negatives? or both?</p><ul><li>For instance in Cancer Prediction — a false negative can be very harmful! In such a use case “Recall” is the most important metric.</li><li>In anomaly detection — false positives is what we want reduce, here “Precision” matters.</li><li>F1 take all three into account.</li></ul><p><br>In this case, if we a call something similar when it was not (False Positive) is a more expensive mistake than if we call something dissimilar when it was similar. (False Negative)<br>In this case we don’t care too much about false negatives. We want to reduce false positives. Thus we should be tracking Precision. i.e (TP/TP+FP)</p><hr><h1 id="a-commercial-word-of-caution">A Commercial Word of Caution</h1><p>There might be a temptation to treat this as a scientific problem. For us, it is not. It is a commercial problem and thus our first focus should be to find out APIs, packages and existing solutions. Apply them.<br>Anything — such as Spacy — that gives ready made solution should be primarily used. That should be the highest priority. Any prediction that is better than RANDOM, is a great result to start with. We then engineer to improve it. We are not writing a scientific paper but getting a working prototype out.<br></p><h2 id="can-this-be-a-multi-label-classification-problem">Can this be a multi-label classification problem?</h2><p>Turns out that we could complicate the matters a little further. Why settle for just binary decisions of similar/dissimilar? They show no nuance, of the kind that actually exists in journalism. Please read the following to see a more nuanced approach.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://adelkar.info/news-item-similarity-as-a-multi-label-one-hot-classification-problem/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">News Similarity - a Multilabel Classification Problem</div><div class="kg-bookmark-description">ForewordIn the previous post [/news-similariry-ml/], I had proposed that we frame ournews item grouping and similarity problem as a Binary Classification problemwhere news items are classified using various techniques of Semantic TextualSimilarity (STS). I had propose a 2 broad approaches: 1.…</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity — a Binary Classification Problem"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/simmilarity2-2.png" alt="News Similarity — a Binary Classification Problem"></div></a></figure>]]></content:encoded></item><item><title><![CDATA[News Similarity — a Multi-label (one-hot) Classification problem]]></title><description><![CDATA[Instead of just similar/dissimilar we see 4 categories of relationships that two news items could have with each other]]></description><link>https://adelkar.info/news-item-similarity-as-a-multi-label-one-hot-classification-problem/</link><guid isPermaLink="false">5fcd351ff2917c11e736f183</guid><category><![CDATA[machine learning]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Fri, 04 Dec 2020 19:51:00 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/12/simmilarity2.png" medium="image"/><content:encoded><![CDATA[<h3 id="foreword">Foreword</h3><img src="https://adelkar.info/content/images/2020/12/simmilarity2.png" alt="News Similarity — a Multi-label (one-hot) Classification problem"><p>In the previous <a href="https://adelkar.info/news-similariry-ml/">post</a>, </p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://adelkar.info/news-similariry-ml/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">News Similarity — a Binary Classification Problem</div><div class="kg-bookmark-description">Problem StatementGiven a pair of news items — Ni and Nj, we want to know if Ni and Nj are talkingabout the same event/thing/news.Say we have a large set N of 10,000 news items. And create 10,000C2 pairs of(Ni, Nj) such that i,j are between 0, 10,000. Our problem statement is to comeup with a fu…</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://adelkar.info/favicon.ico" alt="News Similarity — a Multi-label (one-hot) Classification problem"><span class="kg-bookmark-author">Siddharth Adelkar</span><span class="kg-bookmark-publisher">Adelkar Kerfuffle</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://adelkar.info/content/images/2020/12/similarity.png" alt="News Similarity — a Multi-label (one-hot) Classification problem"></div></a></figure><p>I had proposed that we frame our news item grouping and similarity problem as a Binary Classification problem where news items are classified using various techniques of Semantic Textual Similarity (STS). <br>I had propose 2 broad approaches:</p><ol><li><strong><u>Supervised machine learning approach</u></strong></li></ol><ul><li>Here where we are required to create a large binary labelled training dataset. This dataset establishes the correlation between various features of pairs of news content and the final label assigned to the pair — similar (1) or dissimilar (0)</li><li>We are required to make feature engineering choices. That is to say, that we train the machine by feeding it</li><li>Cosine difference (and other comparative distances) between the document vectors of the news content pair respectively</li><li>Cosine difference (and other comparative distances) between the sentence embeddings of the title.</li><li>Intersection set or some weighted score of the named entities (such as orgs, people, etc..) recognized by such commercial software as Spacy.io</li></ul><ul><li><br></li></ul><figure class="kg-card kg-image-card kg-width-full"><img src="https://paper-attachments.dropbox.com/s_FBEF826811952109ED7AB15D1C70DD514C0DCF91562F47FF0584FB1CA5F8D972_1598781676350_image.png" class="kg-image" alt="News Similarity — a Multi-label (one-hot) Classification problem"></figure><ol><li><strong><u>Heuristic “Jugaad” approach</u></strong></li></ol><ul><li>Here we don’t employ machine learning. Why? Because we don’t have enough labelled training data. In stead we take the features that we identified above — cosine distance between doc vectors, weighted score of the common named entities and perhaps other metrics such as the levenshtein (edit) distance between the titles</li></ul><ul><li>-- and we engineer a jugaad equation and threshold — or logical function — out of all these metrics, such that this threshold comparison or function returns 0 (dissimilar) or 1 (similar).</li></ul><ul><li><br></li></ul><figure class="kg-card kg-image-card"><img src="https://paper-attachments.dropbox.com/s_FBEF826811952109ED7AB15D1C70DD514C0DCF91562F47FF0584FB1CA5F8D972_1598781336434_image.png" class="kg-image" alt="News Similarity — a Multi-label (one-hot) Classification problem"></figure><p><code>if (['content_similarity']&gt;0.95) &amp; (['size_intersection']&gt;2) &amp; (['weighted_score']&gt;100) then return 1 #SIMILAR else reutrn 0 #DISSIMILAR</code><br>There are 2 main differences between the two approaches</p><ol><li>In the second approach our coder jugaads a heuristic function that return boolean for similarity/dissimilariy. In this approach the human coder peruses the data available to her and designs such a heuristic through trial and error. In the first approach the machine essentially automates the human jugaad and constructs this function.</li><li>So that the machine is able to beat the human being in perusing the data, the machine needs training data with input/label rows as shown in fig. 1. . Approach 1. hence needs a huge training dataset. This training dataset needs to have correct labels (“Similar” or “Dissimilar”) assigned to pairs of news content. These labels need to be human supervised and accurate. This is a mammoth undertaking that can only be done with incentives for the human data entry participants.</li></ol><hr><h1 id="the-data-wants-to-know-vagaries-of-journalism-">The Data Wants to Know! - vagaries of journalism.</h1><p>In this post, I propose that what I formulated as a binary classification — labels = 0 or 1 — is in fact a multi-label classification problem.<br>In modern newsrooms, a large number of reports come from news agencies and syndicated content. This is why, many a times, we will see the same PTI or Reuters — both news agencies — report carried by Moneycontrol and Times of India. <br>There is however, a catch — the titles or “headlines” of a news items is the mandate of the editor of the newspaper. Thus it is possible that identical reports with nearly the same content will have totally different titles. Additionally, <br>Secondly, it is well within the purview of the newspaper — and they often exercise this prerogative — to change only a few phrases in the news agency copy before carrying it. Thus the exact same report will appear as distinct strings to the computer. (Here is where the metric levenshtein distance comes handy)<br>Thirdly, we might not want to show various versions of the same Reuters/PTI report to the user. <br>Lastly, on the same day two newspapers might refer to the same event — fed raising interest rate as —  “Fed raises interest rates, causing the market to crash” , “Copper rises after interest rates hiked” <br>I propose that we introduce nuances to the similarity level of articles. This way, the news app ui will be able to make better decisions pertaining to User Experience on the exact kind of similarity. That is, news app ui may chose to act differently  to same articles from news agency vs. those that are different takes on the same event.<br>When I fetch news data from news api, I see mainly 4 kinds of relationships between article pairs.<br></p><ol><li><strong>UNRELATED:</strong></li></ol><!--kg-card-begin: html--><table style="width: 100%;border-spacing: 0;border: 1px solid #c1c7cd;word-break: break-word;"><tbody><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Joe Biden's victory will endanger nation and destroy American greatness: Donald Trump</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">TikTok booms in Southeast Asia as it picks path through political minefields</span></div></td></tr></tbody></table><!--kg-card-end: html--><p><br></p><ol><li><strong>RELATED</strong></li></ol><p>There is typically a chronology here.</p><!--kg-card-begin: html--><table style="width: 100%;border-spacing: 0;border: 1px solid #c1c7cd;word-break: break-word;"><tbody><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">NEET, JEE 2020 debate: Centre risking lives of students by holding Sept exams, says Mamata. 10 updates - Livemint</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Jharkhand CM Hemant Soren writes to Ramesh Pokhriyal, seeks postponement of NEET, JEE exams</span></div></td></tr><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Will make America world#39;s manufacturing superpower; tax credits to bring back jobs from China: Donald Trump</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Republicans rally behind Trump, say Biden no longer has any principles</span></div></td></tr></tbody></table><!--kg-card-end: html--><ol><li><strong>PARAPHRASES</strong></li></ol><p><br></p><!--kg-card-begin: html--><table style="width: 100%;border-spacing: 0;border: 1px solid #c1c7cd;word-break: break-word;"><tbody><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">At inauguration of Covid care centres: Ajit Pawar, Fadnavis share dais for the first time since failed govt formation attempt</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Ajit Pawar, Devendra Fadnavis together at inauguration of Covid-19 hospital</span></div></td></tr><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-noauthor ace-ltr"><span>Amazon orders 1,800 Mercedes electric vans for Europe deliveries</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-noauthor ace-ltr"><span>Amazon orders 1,800 Mercedes-Benz electric vans for European deliveries - Reuters</span></div></td></tr><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-noauthor ace-ltr"><span>Six Opposition-ruled states seek postponement, move SC over NEET, JEE</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-noauthor ace-ltr"><span>6 oppn-ruled states file review petition in SC against order to hold NEET, JEE exams - Hindustan Times</span></div></td></tr></tbody></table><!--kg-card-end: html--><ol><li><strong>IDENTICAL</strong></li></ol><!--kg-card-begin: html--><table style="width: 100%;border-spacing: 0;border: 1px solid #c1c7cd;word-break: break-word;"><tbody><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">J&amp;J's Janssen to begin Phase II COVID-19 vaccine trials next week in Spain - Reuters</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 0;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Johnson &amp; Johnson's Janssen to begin Phase II COVID-19 vaccine trials next week in Spain</span></div></td></tr><tr><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 0;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Gold steady as economic worries counter stronger Treasury yields - Reuters India</span></div></td><td style="border-color: #c1c7cd;border-style: solid;border-top-width: 1px;border-bottom-width: 0;border-right-width: 0;border-left-width: 1px;min-width: 50px;min-height: 20px;padding: 5px 8px;word-break: normal;vertical-align: top;"><div dir="auto" style class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt ace-ltr"><span class=" author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90z8qz88zz83zz67zvz73zu0z86zz73zz69zoz87zz74zz75zqz66zv4z67zpz71zz86zayz77zeaz74zt">Gold steady as economic worries counter stronger Treasury yields</span></div></td></tr></tbody></table><!--kg-card-end: html--><p><br></p><h1 id="another-scheme-of-classification">Another scheme of classification</h1><p>Another scheme of classification would be to classify a pair of news items with their real life journalistic phenomena. For example<br></p><ol><li>Unrelated</li><li>Same real life event different outlets</li><li>Same Agency Report in different outlets</li><li>Identical reports in the same outlet</li><li>Chronologically related articles</li><li>Topically related articles</li></ol><p><br>This might be better for the App UI to make decisions.</p>]]></content:encoded></item><item><title><![CDATA[What is Machine Learning?]]></title><description><![CDATA[What is machine learning? What is the Machine learning? How is it related to AI, NLP? How do you measure the quality of ML? What are accuracy, precision and recall?]]></description><link>https://adelkar.info/what-is-machine-learning/</link><guid isPermaLink="false">5fbfad9cf2917c11e736efbb</guid><category><![CDATA[machine learning]]></category><category><![CDATA[Deep Learning]]></category><category><![CDATA[artificial intelligence]]></category><category><![CDATA[recall]]></category><category><![CDATA[precision]]></category><category><![CDATA[accuracy]]></category><category><![CDATA[natural language processing]]></category><category><![CDATA[tsec]]></category><category><![CDATA[biomedical]]></category><dc:creator><![CDATA[Siddharth Adelkar]]></dc:creator><pubDate>Thu, 26 Nov 2020 13:50:04 GMT</pubDate><media:content url="https://adelkar.info/content/images/2020/11/Machine-Learning-Workshop--TSEC-2020.png" medium="image"/><content:encoded><![CDATA[<img src="https://adelkar.info/content/images/2020/11/Machine-Learning-Workshop--TSEC-2020.png" alt="What is Machine Learning?"><p>Machine Learning (ML), Deep Learning, Artificial Intelligence (AI) and Natural Language Processing (NLP) have become buzzwords. I have seen them being used interchangeably and casually. But what is machine learning really and how is it related to these other terms?</p><p>What exactly is machine learning? Moreover, what is the Machine learning?</p><p>Here is a deck I presented at the Thadomal Shahani College of Engineering on Feb 28, 2020 at the request of the students of the department of biomedical engineering. A special thanks to Prof. Dhananjay K. Theckedath of the department.</p><!--kg-card-begin: html--><iframe src="//www.slideshare.net/slideshow/embed_code/key/FNTCIv9SmMuPi9" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/siddharthadelkar/machine-learning-workshop-tsec-2020" title="Machine Learning Workshop, TSEC 2020" target="_blank">Machine Learning Workshop, TSEC 2020</a> </strong> from <strong><a href="//www.slideshare.net/siddharthadelkar" target="_blank">Siddharth Adelkar</a></strong> </div><!--kg-card-end: html-->]]></content:encoded></item></channel></rss>