<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Data Science Milan on Medium]]></title>
        <description><![CDATA[Stories by Data Science Milan on Medium]]></description>
        <link>https://medium.com/@datasciencemilan?source=rss-2e24777d0503------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XY_a4c8YXo-nUW1dU-YusA.png</url>
            <title>Stories by Data Science Milan on Medium</title>
            <link>https://medium.com/@datasciencemilan?source=rss-2e24777d0503------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:11:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@datasciencemilan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Some fragments of presentations collected at PyCon Italia 2024]]></title>
            <link>https://datasciencemilan.medium.com/some-fragments-of-presentations-collected-at-pycon-italia-2024-72cdeb311139?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/72cdeb311139</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pycon]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 11:25:23 GMT</pubDate>
            <atom:updated>2024-06-22T11:25:23.443Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mOBGUDkybS9CedRnoK8Bag.png" /></figure><blockquote>Following the last year edition another chapter of PyCon Italia is added on 2024 in the wonderful context of Florence, with nice people, PyFiorentina, amazing staff, opportunity of tourism trip in the city….and obviously talks and workshops.</blockquote><p>The weekend started with the Keynote talk by Jodie Burchell discussing the hype and misinformation surrounding the idea that LLMs are behaving in a human-like way, highlighting the impressive language abilities they have demonstrated, but also cautioning against exaggerated claims about their sentience and intelligence. She argues that there is still a lot of confusion about what these models are actually capable of, and that it is important to understand the limitations of their language abilities, which are based on distributional semantics, but they lack of the subjective experience, tipical feature of sentience.</p><p>Great Luca Baggi presented to the attendes the <strong>functime </strong>library. This package is dedicated to the time series analysis. Yes, meanwhile we are waiting a valid foundation model for time series, it is worth considering using <strong>functime</strong> because it offers the ability to perform global forecasting, handle feature extraction, conduct model comparisons, diagnostics, and includes time series pre-processing. Moreover, thanks to Polars under the hood, it is fast and efficient. The only issue till now, if I’m not wrong, the lackness about neural networks models.</p><p>Then rocket man Marco Gorelli covered a presentation about the development of an agnostic dataframe. One library to use is called <strong>Narwhals</strong>. The presentation covers the problems with only supporting Pandas in data science libraries, the limitations of converting everything to Pandas, and the benefits of using <strong>Narwhals</strong> to support multiple data frame libraries, such as Polars, with a lightweight dependency. The presentation demonstrates how <strong>Narwhals</strong> translates syntax, supports lazy and GPU execution, and is flexible for different backends.</p><p>Then a list of talks about Retrieval Augmented Generation (RAG). I start with Guillaume Lemaitre which talked about <strong>Ragger Duck</strong>, an implementation of a RAG model trained on the scikit-learn documentation. Yes, the idea is coming from the implementation of the search engine, because it was limited and it didn’t find anything, meanwhile with LLMs the goal was to improve the scikit-learn user experience on the search bar. It uses Mixtral as Large Language Model combined with llamma cpp to perform the inference, and for the information retrieval function it uses sentence BERT with FAISS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nG-ZypfEy7vVk9ibo2ehZg.png" /><figcaption>From PyCon Italia 2024</figcaption></figure><p>Inspirational talk by Tommaso Radicioni which showed the implementation of RAG with <strong>Haystack, </strong>an<strong> </strong>open-source framerwork with the same role of LangChain. Before the demo of the pipeline realized with Streamlit contribution, he showed and explained several types of RAG architectures. Naive RAG involves indexing and retrieval of relevant information, with components for cleaning, embedding, and storing text data. Advanced RAG introduces improvements to overcome the limitations of Naive RAG. It employs pre-retrieval and post-retrieval strategies, with a focus on improving document management, generation, memory handling, and functionality through features like optimizing indexing, fine-grained segmentation, metadata augmentation. At the end was presented the modular RAG architecture enhances the pipeline structure by incorporating new models for processing queries and routing information, such as adding a search module for similarity searches and refining the retriever through fine-tuning, allowing for more flexibility and customization in the retrieval process. If you want to know deeply the topic read this <a href="https://arxiv.org/pdf/2312.10997">paper</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GGCcF-lbSlwuTa1iU3zNbw.png" /><figcaption>From PyCon Italia 2024</figcaption></figure><p>The last talk on the RAG topic was presented by Nicola Procopio, who explained the RAG architecture within the <strong>Cheshire Cat </strong>open-source framework. The framework utilizes agents and can be customized by the user. It is built on Qdrant VectorDB and supports different types of memory: short-term memory for speeches, long-term memory for documents, and tool memory. Nicola described several techniques used to optimize the embedding space, such as quantile and quantization, and T-SNE for the projection of the reduced embedding space.</p><p>That’s it, see you next year.</p><p><strong>References:</strong></p><p><a href="https://www.youtube.com/@PythonItalia">PyconItalia Channel</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72cdeb311139" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Empowering the Bending Spoons’ platform with data science]]></title>
            <link>https://datasciencemilan.medium.com/empowering-the-bending-spoons-platform-with-data-science-43fbb9f11b4a?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/43fbb9f11b4a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bending-spoons]]></category>
            <category><![CDATA[customer-lifetime-value]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 15:52:37 GMT</pubDate>
            <atom:updated>2023-11-23T15:52:37.360Z</atom:updated>
            <content:encoded><![CDATA[<p>On November 7, 2023, Data Science Milan hosted a Meetup at the amazing Bending Spoons headquarters.</p><p>The <a href="https://medium.com/u/9f515c8f83e9">Bending Spoons</a> startup, founded in 2013, became famous for app development. Today, it is considered one of the best tech companies in Europe, with an international culture at its core.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IGCVmIkE8b4ck-k2aPUsg.png" /><figcaption>from bending Spoons website</figcaption></figure><p>“<strong>Empowering the Bending Spoons’ platform with data science”, by Andrea Maiorana</strong></p><p>Andrea began introducing the platform, which is used to build, acquire, improve, and operate products, mostly digital ones, throughout their entire lifecycle.</p><p><strong>Bending Spoons Data Science Pipeline</strong></p><p>The platform’s data pipeline can be summarized in three main steps. It starts by collecting data from clients through app backends, app stores, and advertising networks using a set of purpose-developed tools. The data is then stored in a centralized data warehouse, the single place where the Company can access it. The final step involves transferring this data to various activities, ranging from data exploration to measuring and predicting app user KPIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kBVxipUEp8g8zzcGoiuKg.png" /></figure><p><strong>Data Scientist’ job at Bending Spoons</strong></p><p>The role of a data scientist at Bending Spoons revolves around the idea of <strong>measuring</strong> and <strong>predicting</strong> app user metrics.</p><p>Andrea started discussing some challenges related to KPI measurement to support decision-making. The goal is to ideally obtain unbiased and efficient non-parametric estimators of user profiles for a given user base, complete with confidence intervals. The first challenge arises from censoring, as not all users were observed for the same duration. However, it’s crucial not to discard all user information, as it may contain valuable data. The second problem stems from the strong correlation between different data points in the profiles. If not handled properly, this correlation can lead to significant underestimations in the intervals, potentially resulting in incorrect decision-making.</p><p>The last issue for this topic regards how to exploit and serve these custom metrics, in a quick and user-friendly way. The accessibility of metrics given by big SQL queries brings a complex process that can become very expensive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kq1OzW-vxJokEykzcO1GVw.png" /></figure><p>In the next session, Andrea discussed the prediction of app user metrics, highlighting a common challenge: predicting metrics for app users over a short duration instead of a longer one, such as with new users who lack sufficient data for model training. Bending Spoons addresses this prediction challenge through two approaches: either with single-user predictions or cohort-level predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJnZwis3x2EZIMgd3ohBgQ.png" /></figure><p>In the first approach, the primary challenge is predicting the lifetime value of each user based on their attributes and in-app actions. The issue arises when models are trained on old users, but the predictions are needed for new users, and they must be updated with additional actions observed from these users. The solution adopted, detailed in the poster session, involves a complex model architecture. This architecture comprises interconnected models, meaning predictions are derived from different moments in the users’ lifetime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgKOVX6uFodugx4WrvgMcg.png" /></figure><p>In the second approach, the primary challenge is to determine the average value of a certain metric across a user base. In other words, when given a group of users, the goal is to predict how a specific average user profile will evolve in the future. The solution, as detailed in the poster session, initially involved using parametric models with the assumption that a user can be either alive or dead at each renewal cycle with a certain probability. However, due to speed concerns, the adopted solution shifted to a Seq2Seq Deep Learning model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWdlYlXtxY0HYA75orXKSQ.png" /></figure><p>Andrea continued the talk, delving into the validation process, addressing the same issues encountered earlier, and showcasing applications like automated advertising campaigns and personalized app content.</p><p>The meetup didn’t conclude with the talk alone. Instead, in the wonderful Bending Spoons atmosphere, we had the opportunity for aperitif networking and a poster session, allowing a detailed exploration of the topics introduced during the talk.</p><p><strong>Recording</strong></p><ul><li><a href="https://www.youtube.com/watch?v=XtN-7C98YT4&amp;t=19s">video</a></li></ul><p>Written by Claudio G. Giancaterino &amp; Matteo Boscato</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43fbb9f11b4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Journey into PyCon Italia 2023]]></title>
            <link>https://datasciencemilan.medium.com/a-journey-into-pycon-italia-2023-6e4b1e849c45?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e4b1e849c45</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[pycon]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Tue, 30 May 2023 21:13:06 GMT</pubDate>
            <atom:updated>2023-05-30T21:13:06.055Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7pcm_jZJphM_nXIN.png" /><figcaption>by nephila.digital</figcaption></figure><blockquote>PyCon is the largest annual gathering for the community using and developing the open-source Python programming language and it is held over the World.</blockquote><p>At the last weekend of May ’23, “PyCon Italia” organized the PyCon event in Italy. Looking at some highlights, it started with two commercial talks: “GPT or how I learned to stop worrying and love the generative AI” by Tommaso Radicioni and “Beyond grid search: XGBoost and Optuna as the ultimate ML optimization combo” by William Arias.</p><p>Great explanation by Tommaso, he started with the evolution of Language Models from n-gram to GPT as Large Language Models. He went deeply showing how to build and improve a GPT model into the Hugging-Face platform, and in my opinion, this talk would be worth a workshop.</p><p>I was impressed by William’s presentation by the simplicity of how he talked about the Optuna optimization system applied to the XGBoost model. You just need to embed your model and hyperparameters into an objective function and everything is done!!!</p><p>One strength of this conference was the atmosphere, good food, red wine at every table for lunch and friendly people.</p><p>A weakness that I met was the organization of the rooms, with a crowd of people, and so many times seats weren’t enough.</p><p>Friday&#39;s day ended with a PyDrink with the opportunity to enjoy with other Pythonists discussing on the talks presented during the day.</p><p>Saturday was really special, with “Beyond Pandas: lightning fast-in memory data frames with Polars” by Alberto Danese. Surely the best talk that I’ve listened to and one of the best presentations than the others that I haven’t had the opportunity to listen to.</p><p>Polars is the new attractive tool to manage data frames faster than Pandas with a Pythonic language, so a really good alternative to it. Alberto explained some Polars key features and was able to explain the weaknesses and strengths between Polars, Pandas and others. I think it’s time to try this tool.</p><p>PyCon Italia organized also a mini walk tour in Florence for those who were interested to visit the beautiful city, and the day ended with a PyDinner (eating Fiorentina for fans) and a concert. Amazing Italian mood!!!</p><p>The event ended, for this edition, on Sunday with interesting talks to mention. First of all “ChatGPT and Minecraft’s diamonds playing agents: Reinforcement Learning in a nutshell with sheeprl” by Federico Belotti, he spoke about SheepRL, a Deep Reinforcement Learning framework built by Orobix on the top of OpenAI Gym. Going ahead with Orobix guys is mandatory to mention “Controlling the Chaos: Reproducible Deep Learning Experiments Using Lightning and Hydra” by Refik Can Malli. In this talk, Refik explained how to combine YAML files and open-source tools such as Hydra, Lightning framework, and Pytorch to make more efficient and reproducible deep learning projects. Another good talk that would be worth a workshop. Then surely the topic to pay attention to in the future is AI Safety and Stefania Delprete gave us just a little taste with the talk “Introduction to AI Safety. Let’s be ready before it’s to late!”</p><p>I want to mention my other favourite speech coming from Luca Baggi: “Is the great data frame showdown finally over? Enter: polars”. With this talk, Luca went deeply into Polars showing lazy and eager APIs in query applications going beyond the introduction held by Alberto Danese.</p><p>I was not attracted by the workshops and I hope in future meetings to see something able to catch up my attention.</p><p>You can enjoy the conference with <a href="https://www.youtube.com/@PythonItalia/streams">youtube video</a>s, and pick up inspirations for your job.</p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e4b1e849c45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use the Economic Complexity Index to guide innovation plans]]></title>
            <link>https://datasciencemilan.medium.com/how-to-use-the-economic-complexity-index-to-guide-innovation-plans-142cfa101369?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/142cfa101369</guid>
            <category><![CDATA[labour-market]]></category>
            <category><![CDATA[complexity-theory]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[economic-theory]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Mon, 07 Nov 2022 20:06:13 GMT</pubDate>
            <atom:updated>2022-11-07T20:06:13.989Z</atom:updated>
            <content:encoded><![CDATA[<p>On October 13th, 2022 Data Science Milan held a Meetup at Vedrai headquarters with Mauro Pelucchi as a speaker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYVjwtH0vAW_URWRqqS1_g.jpeg" /></figure><p>“How to use the Economic Complexity Index to guide innovation plans”, by Mauro Pelucchi, Head of Global Data Science at Lightcast</p><h3><strong>Intro</strong></h3><p>Mauro kicked off the meeting introducing the main topic of his speech: the Economic Complexity Theory. From the economic field, he stated, we can learn a lot of interesting metrics that we can apply to several contexts, for instance to the Labor Market one. During the meet-up, Mauro talked about the Economic Complexity Index, a network measures that provide insights into economic development patterns.</p><h3><strong>Economic Complexity Theory</strong></h3><p>Let’s start with a bit of background about the Economic Complexity Theory: this concept was firstly developed by Hidalgo and Hausmann in 2009 to identify countries comparative advantage.</p><p>Today this theory is used to capture the process of knowledge creation in an economy, by looking at the combination of 2 metrics:</p><p>· Diversity: how many different sectors does an area specializes in?</p><p>· Ubiquity: how many areas are specialized in a given sector?</p><p>On average, it has been observed that economies with a higher Economic Complexity Index tend to have a competitive advantage in several highly complex sectors. In fact, area that can sustain a diverse range of activities know-how, including sophisticated, unique know-how, are more likely to be able to do a wider diversity of activities, including complex ones that few other areas can make.</p><p>Mauro suggested to use the Economic Complexity Theory to measure the activity space of a country. For instance, you can observe the activity space for Italy in Fig.1: the colors depend on the sector activity whereas the size is not determined by the frequency of the activity, but rather by a measure of importance that we are going to see later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*_WczFzFs3Tg0Jhv5-N6kXg.png" /><figcaption>Fig.1</figcaption></figure><p>We can apply the Economy complexity theory to the labor market and compute the complexity of an occupation based on the diversity of skills it requires, together with their ubiquity. Occupations that request to know a diverse range of know-hows, including sophisticated, unique know-how, are found to be able to do a wide diversity of skills, including complex one that few other occupations can make.</p><p>The Economy Complexity Theory is based on 4 indexes:</p><p>· Specialization: significant presence or absence of the skills for the occupation</p><p>· Diversity: how many different types of skills an occupation requires</p><p>· Ubiquity: the number of occupations that require a skill</p><p>· Proximity: the probability that an occupation requires skill A given that it requires skill B, or vice versa</p><p>If we mix these concepts, we arrive to the Economic Complexity Index. Let’s see an example of the application of the Economic Complexity Index to UK: we see in Fig.2 the evolution of the economy complexity in UK by using labor market data, like job posting data scraped from the web. Mauro said that the grey area is Aberdeen because there are lots of Oil&amp;Gas companies, so the complexity of Aberdeen is constant. London on the other hand, seems to have increased its high degree of complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*mxR_F195nFXg1rbFfO53WQ.png" /><figcaption>Fig.2</figcaption></figure><h3><strong>How is Complexity mathematically defined?</strong></h3><p>From a mathematical point of view we can define Complexity as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*toAzhlPrD-9HQbZbOUQBAA.png" /></figure><p>where Kc, Kp, Mcp, are respectively the complexity of an area, the complexity of a product, the specialization matrix.</p><p>Mauro provided an intuition that computing the Economic Complexity Index is in a way similar to a graph application because, if we compute iteratively the formula, we will end up composing a kind of graph. If for instance we apply this theory to the labor market data, we will obtain the results in Fig. 3 for UK: you can see that if we compute ubiquity of different skills, we have some skills going up and others down. Let’s take Agile Methodology for which the ubiquity goes up: it means that this skill is becoming more widespread and, therefore, it’s less complex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*azIFEMH1N9jyred7NtW_hw.png" /><figcaption>Fig.3</figcaption></figure><p>Mauro said that under the hood of the ubiquity computation we have the RCA (Revealed Comparative Advantage), an index used in international economics for calculating the relative advantage or disadvantage of a certain country in a certain class of goods or services.</p><p>We can apply this index also to specific skills, for instance Excel is very spread in every occupation, but it does not mean that is very important in every occupation; on the other hand, aerodynamics is very important for specific occupations, but it is not present in every occupation. RCA measures therefore the specialization of a skill: for our example, Excel will have a very low RCA because it’s present in every occupation!</p><h3><strong>What problems are we trying to solve with the Economic Complexity Theory?</strong></h3><p>Let’s look at some examples:</p><p>· Microsoft Excel is often found among the top ten required skills for every occupation. But what level of knowledge is required for Microsoft Excel? Should a Data Scientist know Excel functions at the same level as a sales representative of accountant?</p><p>· How much of robotics does a software developer need to know? What about an automation engineer? What are the most intensive skills an engineer needs to know?</p><p>· Is an occupation equally complex between different communities? Can we identify proximities between communities that have common sectors and occupations?</p><p>Let’s see in Fig.4 an example of UK Economy Complexity, comparing the probability to increase the employability of an occupation between 2017 and 2021. We see for instance that in Aberdeen mechanical engineers are much more specialized in 2021 compared to 2017. It’s a kind of projection of the labor market that we can have in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*DsAJyInMc40h9Lyt9Whe7A.png" /><figcaption>Fig.4</figcaption></figure><p>We can also measure the diversity of a specialization (see Fig.5), in a way that it helps us measure the evolution of role complexity over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*zm5oPwqLYsIntqnPnI6hvA.png" /><figcaption>Fig.5</figcaption></figure><p>Finally, we can also understand the intensity of the relation between 2 skills, like excel and another skill (for instance SQL) — see Fig.6. For instance, we can see how many times Excel and SQL are present together. Mauro says that when Excel and SQL are found together the salary goes up, so it’s a proficient combination of skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*hkqd1KswUnPBGp-7ew3CPw.png" /><figcaption>Fig.6</figcaption></figure><h3><strong>Recording &amp; Slides</strong></h3><p>· <a href="https://www.youtube.com/watch?v=Ql_lZEMQLjI">Video</a></p><p>· <a href="https://lnkd.in/dbTw6m2m">Slides</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=142cfa101369" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robustness Metrics for ML Models based on Deep Learning Methods]]></title>
            <link>https://datasciencemilan.medium.com/robustness-metrics-for-ml-models-based-on-deep-learning-methods-f35dc84344d9?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/f35dc84344d9</guid>
            <category><![CDATA[robustness]]></category>
            <category><![CDATA[variational-autoencoder]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[generative-adversarial]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Wed, 03 Aug 2022 16:48:25 GMT</pubDate>
            <atom:updated>2022-08-05T08:21:27.247Z</atom:updated>
            <content:encoded><![CDATA[<p>On July 21st, 2022 Data Science Milan held a Meetup at Alkemy headquarters with Davide Posillipo as a speaker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zbnQqwIHbfpSFJS1.jpeg" /></figure><p>“Robustness Metrics for ML Models based on Deep Learning Methods”, by Davide Posillipo, Lead Data Scientist at Alkemy</p><h3>What does it happen if we pass a chicken to LeNet?</h3><p>Davide started the talk introducing one of the most famous datasets when it comes to Deep Learning, i.e. MNIST, and how it is possible to easily identify digits leveraging a LeNet architecture. But what does it happen if we pass a picture which is not related to digits, e.g. an image of a chicken, to the LeNet trained on MNIST?</p><p>In an ideal setting, since the chicken’s image comes from a completely different distribution respect to the digits one, we would expect that the algorithm doesn’t have any idea of what to do with that image. However, the funny thing is that the LeNet gets a quite strong prediction of the chicken being actually a 6 (see Fig.1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*tzxQbnRaiZgqQp8Fy7b_mg.png" /><figcaption>Fig.1 Passing a chicken to LeNet — Expectation vs Reality</figcaption></figure><p>Usually Statisticians, or more general people familiar with the subject, provide a set of ‘metrics’ together with the estimates, so to help understanding how confident we can be about the generated prediction (e.g. the <em>p-value,</em> to trust if this is a good prediction or just noise). Unfortunately, complex Machine Learning or Deep Learning models generally don’t come with these ‘safety metrics’, and looking exclusively to the probability of each prediction could be misleading. Normally this happens also if we do something a bit more complicated. Let’s assume images coming from another famous dataset, FashionMNIST, are passed to the LeNet: as for the chicken’s image, the network provides quite ‘confident’ predictions, with almost 90% of examples which are classified with a probability greater than 0.75.</p><p>A solution to handle this problem is represented by ‘robustness metrics’, which is the actual topic presented by Davide.</p><h3>Robustness metrics</h3><p>After seeing the weird behaviors occurring even when dealing with an easy problem like the MNIST one, a question comes up: can we trust deep learning predictions? What about if we are operating in some very sensitive area like health care or autonomous driving?</p><p>Sometimes, in contexts where risk must be controlled, avoiding a prediction is a much better option rather than going with a random guess. Within this framework we would need some metrics working in a way that if the metric value does not reach a pre-defined threshold, then an exception is raised, and a prediction is not computed. A crucial point here is that the focus is not on fixing the prediction (or rather fixing the model), whereas it’s on avoiding the prediction itself!</p><p>Once agreed that this could be a strategy, the next question popping up is: how should a robustness metric look like? First things first, it should tell us if the prediction is reliable (or if it’s in a way a random guess) by providing a measure of ‘confidence’. On top on this we could define a check list with some properties that our metric should have:</p><ul><li>It should be computable without labels</li><li>Computable in ‘real-time’ (in case of any stream of inputs where we want to process one after the other)</li><li>Easy to plug-in into a working ML pipeline</li><li>Low false positive rate, but also low false negative rate: high effectiveness in detecting the anomaly points (low false negative rate), low rate of discarded ‘good predictions’ (low false positive rate)</li></ul><p>But let’s take a step back! We are talking about robustness metrics, but we haven’t defined what robustness is. Well, let’s try to answer this question with a quote of Davide’s own:</p><blockquote><em>Robustness is the quality of an entity that doesn’t break too easily if stressed in some way</em></blockquote><p>Generally, approach in Statistics involve some modification of the predictive model/estimator (‘if you get into a stressful situation, handle it better’), for instance the trimming for the average, or changing the weights of the model, etc., with often a loss of performance as side effect. But what if we don’t modify our models but we protect them from threats (‘Don’t get into stressful situations’). We look for the chickens and keep them away from our model, we prevent them to get into our system.</p><p>We are going see 2 approaches to define robustness metrics:</p><ul><li>GAN-based approach: decide if a prediction is worth the risk, checking the ‘stability’ of the classifier for the new input</li><li>VAE-based approach: decide if a prediction is worth the risk, checking the true ‘origin’ of the new input data</li></ul><h3>First approach: WGAN + Inverter</h3><p>Let’s start with a quick description of GANs (Generative Adversarial Networks). In a nutshell a GAN is a composition of 2 neural networks (Fig.2) where the first one, called <em>Generator</em>, takes some random noise and produces some inputs (like the digits we saw before); the second one instead, called <em>Discriminator</em> (or <em>Critic</em>) decides if the inputs that is coming from the <em>Generator</em> is authentic of artificial. The idea is that at some point, after many iterations, the Generator becomes so good in producing artificial inputs, that the Discriminator can’t distinguish anymore between the real inputs and the artificial ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*Xz4OCe7Ii9oZ2gImS6o_Fw.png" /><figcaption>Fig.2 GAN architecture</figcaption></figure><p>In the approach proposed by Davide, a bit fancier GAN is used: the WGAN (Wasserstein GAN), which uses a different loss function (the Wasserstein distance) which is a measure of the distance between 2 probability distributions. For more information related to the WGAN please refer to this link: <a href="https://lilianweng.github.io/posts/2017-08-20-gan/">https://lilianweng.github.io/posts/2017-08-20-gan/</a>.</p><p>What is relevant in the proposed approach is that compared to the normal GAN setting, where there are only 2 networks, there is a 3rd one that is called <em>Inverter</em>. This additional network takes the inputs that the Generator created, like the fake digits, and translates them back to the latent representation that the Generator is using. It’s essentially the inverse function of the Generator (Fig.3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*Pqg9CCM-I1d3on30zT6l2Q.png" /><figcaption>Fig.3 WGAN + Inverter approach</figcaption></figure><p>With this framework in mind, how do we build our robustness metrics?</p><p>Given a new data point x (i.e. chicken is coming), for which the classifier makes a prediction (it says 6), let’s find the closest point to x in the latent space that is, once translated back to the original space, able to confound the classifier f</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*_IwNv5eYByknAiDP.png" /></figure><p>The idea behind this logic is that starting from z*, the latent representation of the chicken, we look around it and check for the closest data point, in that representation, that can fool the classifier. If we apply it to the chicken example, if the classifier was predicting initially 6, now it will predict 8. The rationale here is that, if only a little effort is needed to make the classifier changing its mind, then perhaps the classifier is not really confident about it.</p><p>The robustness metric at this point could be define as the difference of the translated chicken in the latent space and the closest point that is able to fool the classifier</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/129/0*hkY1wetbBcHvZpj5.png" /></figure><p>If this object is really small then the classifier was very easy to fool, whereas if the difference is big then the classifier is ‘stable’.</p><p>Obviously the question here is: how do we define that is big or small? How do we find the threshold to define where we should make a decision?</p><p>To answers those questions Davide trained the WGAN + the Inverter. After the training he looked at the distribution of on the test set and took, as reference, the 5% percentile as our threshold: the goal is to compare this number with the of the chicken. The latter was way smaller than the threshold, so in this setting it would mean that the prediction is discarded because there’s something weird in the input.</p><p>Reasonably we should check not only a single data point, but rather many (chicken) inputs. To do that the FashionMNIST dataset was used and, taking always the 5% percentile as threshold, we have 5% of positive rate by definition but a 35% loss of good predictions (Fig.4). If we convert this back to our chicken problem, in 35% of the cases we are finding chickens that are not there, and this of course is not a good result.</p><p>One option to overcome the problem could be the tuning of the threshold value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*6RdWi9docFWrASxMBiHq8w.png" /><figcaption>Fig.4 Results of the WGAN + Inverter experiment</figcaption></figure><h3>Second approach: Variational AutoEncoder</h3><p>The second approach to define a robustness metric is based on AutoEncoder, a composition of 2 networks: the Encoder that takes the inputs and ‘compresses’ them in a latent representation, and the Decoder that learns how to take the compression and to expand it back to the real original space (Fig.5). If this works properly, after many iterations it’s not possible to identify the original input from the reconstructed one. The idea does not differ much from the GAN approach, both are using generative approaches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*6RdWi9docFWrASxMBiHq8w.png" /><figcaption>Fig.5 VAE architecture</figcaption></figure><p>What happens with the VAE is that the input is mapped into a distribution, rather than a fixed vector. In this scenario we have a probabilistic encoder and a probabilistic decoder that are somehow approximation of posterior, likelihood and some prior. You can find more info about the topic at the following link: <a href="https://lilianweng.github.io/posts/2018-08-12-vae/">https://lilianweng.github.io/posts/2018-08-12-vae/</a></p><p>But how is it possible to leverage this approach to define a robustness metric? If we pay attention, we see that the loss function of a VAE is somehow an indirect measure of the probability that an observation comes from the same distribution underlying the training set. Basically, the loss function is telling us how hard was decoding after the encoding: so if the decoding was ‘perfect’ we would have a loss function equal to 0; otherwise if the loss was big it wouldn’t work.</p><p>The idea is that an ‘unlikely’ input would produce a big loss function, and this loss function is our actual robustness metric! And the coolest thing here is that we don’t need the classifier at all.</p><p>As for the first approach, Davide trained the architecture and checked the loss distribution. However in this case a conservative approach was followed and the threshold was set equal to the maximum value: no matter what happens, if the loss generated by the new input is higher than the maximum, then it’s discarded.</p><p>As before the FashionMNIST dataset has been considered as a new input for the VAE model: using the maximum test loss as threshold, we get 0% as false positive rate and a 3.55% of lost good predictions (false negative rate), as shown in Fig.6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*iljroNfK8gnULS0aZx5k6A.png" /><figcaption>Fig.6 Results of the VAE experiment</figcaption></figure><p>The VAE approach can also be ‘easily’ deployed in production, following this list of steps:</p><ul><li>Train your classifier</li><li>Train a VAE on your training set</li><li>Get the distribution of the VAE losses on your test set</li><li>Define a threshold more or less ‘conservative’</li><li>Implement a conditional classifier (see Fig.7)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*u_W62XZRa0vEIOsppxESmg.png" /><figcaption>Fig.7 Conditional classifier</figcaption></figure><h3>Conclusions</h3><p>To summarize, Davide explained 2 different approaches to define a robustness metric. Among the two, the one based on VAE seems more appealing especially for the fact that there is no need of having a classifier.</p><p>All in all, the VAE approach comes with several pros, although a couple of cons can’t be avoided. Regarding the benefits, the VAE-based metric can be applied to monitor many different ML models (for a given dataset) at the same time, and is applicable to any kind of data (tabular, image, etc.). In addition, it is relatively ‘easy’ to explain and to plug-in into existing pipelines. On the other hand, arbitrary thresholds must be set by Data Scientists and, finally, the robustness metric approach represents a further model that needs to be maintained in production.</p><h3>Recording &amp; Slides</h3><ul><li><a href="https://www.youtube.com/c/DataScienceMilan">Video</a></li><li><a href="https://www.slideshare.net/ds_mi/">Slides</a></li></ul><p><em>Written by </em><a href="https://medium.com/@matteo.boscato4"><em>Matteo Boscato</em></a></p><p><em>Originally published at </em><a href="https://medium.com/@matteo.boscato4/robustness-metrics-for-ml-models-based-on-deep-learning-methods-9e9e0d41f066"><em>https://medium.com</em></a><em> on August 3, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f35dc84344d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fair ML models and Cross-Attentional Neural Network for Image and Text]]></title>
            <link>https://datasciencemilan.medium.com/fair-ml-models-and-cross-attentional-neural-network-for-image-and-text-d92a13219416?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/d92a13219416</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[image-text-extraction]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[neural-network-algorithm]]></category>
            <category><![CDATA[fair-machine-learning]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Tue, 24 May 2022 04:22:19 GMT</pubDate>
            <atom:updated>2022-05-24T04:22:19.746Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“Novel multimodal learning solution from bank automation”</strong></p><p>On 17th May 2022 Data Science Milan has organized a Meetup at the wonderful Unicredit Tower location with Riccardo Monetti and Dario Saccavino as speakers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*U8-jxu-kE-3jkRgFYIBQEQ.png" /></figure><p><strong>“Towards fair ML models”, by Riccardo Monetti, Data Scientist at Unicredit</strong></p><p>Riccardo has spoken about Fairness in Machine Learning applications.</p><p>Giving a definition of fairness is quite hard, it could be resumed saying it refers to the various attempts used to correct the bias in the decision process based on machine learning models.</p><p>Riccardo has shown fairness as a constructed space where everything is balanced, an ideal world, meanwhile in a real world there are many other variables such as bias, errors, prejudice and so on that transform it in imbalanced space. Fairness is linked with the bias.</p><p>In the data lifecycle, moving on the observed space is introduced the social bias, for instance by subjectivity, then with sampling strategy is obtained a raw data space with representation bias, losing for instance some specific data points and after that with data preparation strategy is obtained a prepared data space introducing another bias, a data preparation bias from data scientists and machine learning engineers.</p><p>In the machine learning modeling the question is which type of bias occur in the measurement from the construct space, which classes have to be protected, then which type of target will be evaluated in the task, and at the end how much unfairness is tolerated to select some actions to mitigate the bias.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*TAQHQYO_eEGilTGsVqykHQ.png" /></figure><p><strong>“Cross-Attentional Neural Network to Compare Image and Text”, by Dario Marino Saccavino, Data Scientist at Unicredit</strong></p><p>Dario has shown a machine learning model developed for a business use case: automating the process of cheque deposit by customers at the ATM. Usually, a client who deposits a cheque into the ATM is asked to manually insert some textual fields written into the cheque (amount and date). Later, a back-office operator manually checks the correctness of the filled fields. The goal of the automated process is to examine the scanned image of the cheque and verify that the printed fields inserted in the ATM is the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*GEWCTMu2jNocPknSeSmbWw.png" /></figure><p>The first step on the cheque verification workflow is based on the object detector, “YoLo model”, the second step consist on extract text from the cropped image and compare with the typed text.</p><p>The approach followed to overcome the difficult in the text extraction was performed by TextMatcher architecture made up by a neural network structure built with an encoder block followed by a sequence-to-sequence decoder.</p><p>The idea to perform a better comparison was to exploit the information from the encoder part, because this side contains all compressed information from the inputs. So, the assessment is made up generating the image embedding and the text embedding to discover, by a cross-attentional block, alignments between the two sequences of elements. This step affords to compute the local similarity score and then the global similarity score compared with the similarity threshold to label if image and text are matching or not.</p><p>The innovative Cross-Attentional neural network is inspired on the self-attention layer from Transformer architecture, well known in NLP.</p><p>The performance of the model was evaluated increasing the similarity threshold with a lower rate tolerating a higher rework rate. The motivation is that with the rework rate as the false negative (the algorithm rejects a correct value), the cheque is passed to the back office with the goal to fix the mistake. Instead with the error rate, when there is the false positive (the algorithm accepts an incorrect value), the cheque has the good probability to pass undetected in the workflow generating issues on the bank process.</p><p><strong>Recording&amp;Slides:</strong></p><p><a href="https://www.datasciencemilan.org/past-events/">video</a></p><p><a href="https://www.slideshare.net/ds_mi/">slides</a></p><p><strong>References:</strong></p><p><a href="https://arxiv.org/abs/2205.05507">[2205.05507] TextMatcher: Cross-Attentional Neural Network to Compare Image and Text (arxiv.org)</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d92a13219416" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some Like it Hot: Choosing a System for Large-Scale Data Analysis]]></title>
            <link>https://datasciencemilan.medium.com/some-like-it-hot-choosing-a-system-for-large-scale-data-analysis-ce625c6fb725?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce625c6fb725</guid>
            <category><![CDATA[time-series-database]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[search-system]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[druid]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 20:07:38 GMT</pubDate>
            <atom:updated>2021-10-12T20:07:38.641Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“The next generation of intelligence tools”</strong></p><p>On 6th October 2021 Data Science Milan has organized a webMeetup hosting Peter Marshall to talk about data analysis system powered by Airbnb, Alibaba, Swisscom, Expedia, British Telecom and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*VLHak4kaCQnE8M_-c1Seow.png" /></figure><p><strong>“Some Like it Hot: Choosing a System for Large-Scale Data Analysis”, by Peter Marshall, Technology Evangelist at Imply</strong></p><p>Peter started talking about Druid.</p><p>Apache Druid is an open-source data store designed for real-time analytics on large data sets, born in 2012 under “Metamarkets” name, and working with advertising exchanges.</p><p>Below common application for Druid:</p><p>-Clickstream analytics including web and mobile analytics</p><p>-Network telemetry analytics including network performance monitoring</p><p>-Server metrics storage</p><p>-Supply chain analytics including manufacturing metrics</p><p>-Application performance metrics</p><p>-Digital marketing/advertising analytics</p><p>-Business intelligence/OLAP</p><p>One of the first adopters was Netflix in 2013, and by 2015 adopters included eBay, PayPal, Cisco, Yahoo.</p><p>Druid is a fully scalable database, it combines different technologies from data warehouses, timeseries databases, and search systems to create real-time analytics for wide <a href="https://druid.apache.org/use-cases">use cases</a>.</p><p>At this point Peter explained Druid’s use cases by temperature bars with hot and cold analytics applications. With cold use cases you don’t care about how slow the queries are to run. The activity is more about standard reports, and the output is fairly predictable. Cold user interface is more for careful planning, careful consideration, less about making instinctive decisions.</p><p>In the hot temperature bar, queries have to come back in sub second speed updating data, there’s lots of queries running at the same time. People aspire to be using real-time data, critical to business decisions, so people spend a lot of time doing investigation interactively, called Online Analytical Processing (OLAP). This hot lane is suitable for risk and forward analytics, data driven applications, clickstreams and web analytics, digital advertising, all applications where a database is scalable with the number of users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*K4CWpKCOKE56-0sLzZzbCw.png" /></figure><p>OLTP RDBMS, ETL, Data Lake, and Query engines features are merged into Druid ingestion layer, a storage format, a querying layer, and a core architecture.</p><p>At the end, using indexing, data partitioning, query caching, data compression, and massive parallel processing affords Druid to have high-performance in real time analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*5TYNE6i1w448x6ZawIqzwA.png" /></figure><p><strong>Recording&amp;Slides:</strong></p><p><a href="https://www.datasciencemilan.org/past-events/">video</a></p><p><a href="https://www.slideshare.net/ds_mi/">slides</a></p><p><strong>References:</strong></p><p><a href="https://druid.apache.org/">https://druid.apache.org</a></p><p><a href="http://static.druid.io/docs/druid.pdf">http://static.druid.io/docs/druid.pdf</a></p><p><strong>Interesting related links:</strong></p><p><a href="https://blog.knoldus.com/introducing-druid-realtime-fast-data-analytics-database/">https://blog.knoldus.com/introducing-druid-realtime-fast-data-analytics-database/</a></p><p><a href="https://blog.knoldus.com/data-ingestion-in-druid-overview/">https://blog.knoldus.com/data-ingestion-in-druid-overview/</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce625c6fb725" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Question generation using NLP]]></title>
            <link>https://datasciencemilan.medium.com/question-generation-using-nlp-95e21a42b51e?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/95e21a42b51e</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[text-summarization]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[question-generation]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Mon, 07 Jun 2021 20:04:42 GMT</pubDate>
            <atom:updated>2021-06-07T20:04:42.670Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“From NLP a helpful tool for teaching”</strong></p><p>On 20th May 2021, Data Science Milan has organized a webMeetup hosting Ramsri Goutham to talk about Questgen, an open-source library used for Multiple Choice Questions generation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*lt2OoLH8xxVfyNDBlEBtsw.png" /></figure><p><strong>“Question generation using NLP by QuestGen.AI”, by Ramsri Goutham, CTO of QuestGen.AI</strong></p><p>Ramsri explained QuestGen open-source library used to generate questions automatically from text. The intuition is coming from the needs to create a tool to automate the assessment process helping teachers in their job. This tool is able to generate from an article/text: Multiple Choice Questions (MCQs), true or false questions, FAQs, paraphrasing, and question answering. Ramsri showed a use case on how to generate multiple choice questions using T5 Transformers.</p><p>Given, for instance an article, the process follows these steps:</p><p>-Extractive summarization;</p><p>-Identify key sentences/concepts;</p><p>-Identify keywords from sentences;</p><p>-Form multiple-choice questions;</p><p>-Distractors generation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*zMQLT2fEcO1-GYkXbA9k_w.png" /></figure><p>T5 Transformer model affords to reframe all NLP tasks into a text-to-text-format where the input and output are always text strings compared to BERT models where output can either a class label or a span of the input. It’s an encoder decoder Transformer model, so giving an input text it will learn to generate an output text, more precisely it will automatically generate a question that is ideally suited, to the context and an answer.</p><p>To train this model is been used a SQuAD data set (Stanford Question Answering Dataset). It is a reading comprehension data set, consisting of questions posed by crowd workers on a set of Wikipedia articles. Answers of questions are actually the keywords extracted from the context, and to obtain them can be used several python keyword extraction libraries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*HQplesWnF_BxZtaI2onMbA.png" /></figure><p>The next step is to understand the right contextual meaning of a keyword, and for this activity are enrolled distractors (wrong answer choices) to discover the correct meaning for a given word in a sentence. To generate distractors can be used several algorithms, and Ramsri showed WordNet and Sense2Vec.</p><p>The first one is a large lexical database of English to capture broader relationships between words, the second one captures contextual information from a word, generating synonyms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*0N3cVzB0MNkeT6AxhV8MqA.png" /></figure><p><strong>References</strong></p><p><a href="http://bit.ly/datasciencemilan">Colab notebooks</a></p><p><strong>Recording&amp;Slides:</strong></p><p><a href="https://www.datasciencemilan.org/past-events/">video</a></p><p><a href="https://www.slideshare.net/ds_mi/">slides</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95e21a42b51e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed up data preparation for ML pipelines on AWS]]></title>
            <link>https://datasciencemilan.medium.com/speed-up-data-preparation-for-ml-pipelines-on-aws-ba518187c48c?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba518187c48c</guid>
            <category><![CDATA[aws-glue]]></category>
            <category><![CDATA[aws-architecture]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[aws-sagemaker]]></category>
            <category><![CDATA[data-wrangler]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Fri, 07 May 2021 03:26:52 GMT</pubDate>
            <atom:updated>2021-05-07T03:26:52.663Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“Life is easier with AWS services”</strong></p><p>On 21st April 2021, Data Science Milan has organized a webMeetup hosting Francesco Marelli to talk about data manipulation pipelines with AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*SB8GnEwzkNZtI7SWSp00uw.png" /></figure><p><strong>“Speed up data preparation for ML pipelines on AWS”, by Francesco Marelli, Senior Solutions Architect at AWS.</strong></p><p>To exploit huge amounts of data, Companies move all their data from various silos into a single location, called a data lake, to perform analytics and Machine Learning. Francesco showed the Lake House Architecture on AWS. The idea behind this architecture is to build a central repository of data upon which different analytics services, from a data warehouse to a Machine Learning service. This allows you to build scalable data lakes, data warehouse, analyse data by purpose-built data services and enabling unified governance and easy data movement.</p><p>Lake Formation collects and catalogues data from databases and object storage, then moves the data into an Amazon S3 data lake. AWS Glue provides all the capabilities needed for data integration, then several layers to offers the broadest and deepest portfolio of purpose-built data services, including Amazon Athena for interactive query, Amazon EMR for big data processing, Amazon Elasticsearch Service for log and search analytics, Amazon Kinesis for real-time analytics, Amazon Redshift as data warehousing and Amazon SageMaker for a Machine Learning service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*sQtR7Q1WIhhWOHbpA45YcQ.png" /></figure><p>Francesco showed use case of AWS Glue, a serverless data integration service for complex workloads connecting hundreds of data sources, and processing data in real time. At the end all of this makes easier to discover, prepare, and combine data for analytics, Machine Learning, and application development.</p><p>AWS Glue runs in a serverless environment. There is no infrastructure to maintain, it allocates needed compute power, run your data integration jobs, and it’s cheaper than other cloud data integration options. AWS Glue automates much of the effort required for data integration, and it crawls your data sources, identifies data formats, and suggests schemas to store your data. It prepares raw data for Machine Learning. Different groups across your organization can use AWS Glue to work together on data integration tasks, reducing the time required to analyse your data.</p><p>As much as 80% of time is spent on task associated with data preparation: extraction &amp; loading, cleaning &amp; normalization, orchestrating data preparation in workflows. AWS Glue DataBrew is a visual data preparation tool that enables users to clean and normalize data without writing any code. It helps to reduce the time needed to prepare data for analytics and Machine Learning (ML). You can choose from over 250 ready-made transformations to automate data preparation tasks, such as filtering anomalies, converting data to standard formats, and correcting invalid values. In this way, business analysts, data scientists, and data engineers can more easily collaborate to get insights from raw data, with the intuitive DataBrew interface, you can interactively discover, visualize, clean, and transform raw data.</p><p>Another service for data wrangling is called AWS Data Wrangler that extends the power of Pandas library to AWS services connecting data coming from different sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*nH7fE_MzMg-fgSWpihUYAw.png" /></figure><p>The last service showed was SageMaker Data Wrangler, the fastest and easiest way to prepare data for Machine Learning. With SageMaker Data Wrangler, you can simplify the process of data preparation and feature engineering, and complete each step of the data preparation workflow, including data selection, cleansing, exploration, and visualization from a single visual interface. SageMaker Data Wrangler contains many built-in data transformations to convert raw data to features for Machine Learning. You are able to quickly detect outliers or extreme values within a data set, identify inconsistencies and potential issues on data preparation that could hinder model accuracy. SageMaker Data Wrangler manage all steps of the data preparation workflow through a single visual interface. Once your data is prepared, you can build fully automated ML workflows with Amazon SageMaker Pipelines and save them in the Amazon SageMaker Feature Store to share features across your team and others, to reuse them for their own models and analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*DBweLBReQiL3E2mWtDOywg.png" /></figure><p><strong>References</strong></p><p><a href="https://aws.amazon.com/it/blogs/big-data/harness-the-power-of-your-data-with-aws-analytics/">Harness the power of your data with AWS Analytics</a></p><p><strong>Recording&amp;Slides:</strong></p><p><a href="https://www.datasciencemilan.org/past-events/">video</a></p><p><a href="https://www.slideshare.net/ds_mi/">slides</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba518187c48c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DLVSystem: Artificial Intelligence and Technology Innovation from Calabria]]></title>
            <link>https://datasciencemilan.medium.com/dlvsystem-artificial-intelligence-and-technology-innovation-from-calabria-3d9e85489c9b?source=rss-2e24777d0503------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d9e85489c9b</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[strong-ai]]></category>
            <category><![CDATA[general-ai]]></category>
            <category><![CDATA[narrow-ai]]></category>
            <category><![CDATA[weak-ai]]></category>
            <dc:creator><![CDATA[Data Science Milan]]></dc:creator>
            <pubDate>Mon, 08 Mar 2021 22:52:27 GMT</pubDate>
            <atom:updated>2021-03-08T22:52:27.084Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“Towards an innovation world”</strong></p><p>On 18th February 2021, Data Science Milan has organized a webMeetup in collaboration with Democratize AI, hosting Professor Francesco Calimeri to talk about Artificial Intelligence topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*rCUZWzwb4Yx55XllUY6LCA.png" /></figure><p><strong>“DLVSystem: Artificial Intelligence and Technology Innovation from Calabria”, by Francesco Calimeri, Professor at the Calabria University from Department of Mathematics and Informatics, partner in DLVSystem.</strong></p><p>Prof. Calimeri has started introducing the Artificial Intelligence concept in the way thought by people: machines that can become humans, machines with human behaviour and emotions. Actually, Artificial Intelligence is a discipline focused on comprehension and replication of intelligent behaviours. The term of Artificial Intelligence was born in the 1955 from John McCarthy: “The science and the engineering of making intelligent machines, especially intelligent computer programs”. At the beginning there were two approaches: strong AI with the goal to replicate humans in solving problems and weak AI with the goal to solve problems in a rational way replacing human activity.</p><p>In the recent years there are settled other concepts: narrow AI and general AI. In the first one, are developed technologies to solve specific tasks and able to outperform humans into specific tasks, so narrow AI is able to replace them. The second one, general AI, has the goal to apply knowledge and skills in different situations in the same way of human intelligence.</p><p>Fundamentals of AI are coming from many disciplines such as philosophy, mathematics, psychology, computer technology and so on.</p><p>In the approaches of AI there are several types of inference. The deduction approach starts from general rules to apply at specific tasks, true premises guarantee true conclusions.</p><p>Instead, the induction approach starts from data to reach general rules. The third approach is the abduction: from observations, the goal is to reach plausible conclusions able to understand the observed event.</p><p>Prof. Calimeri presented DLVSystem as a spin-off from University of Calabria with the intent to transfer research knowledge on the market by activities that are shared into deductive and inductive approaches. Typical examples of DLV applications are: a question answering tool, a workforce management tool, an e-recruitment tool, technologies built by declarative languages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*iMC46efTYWusDpSAfxkn_g.png" /></figure><p><strong>References</strong></p><p><a href="https://artint.info/2e/html/ArtInt2e.html">Artificial Intelligence: Foundations of Computational Agents</a></p><p><strong>Recording&amp;Slides:</strong></p><p><a href="https://www.datasciencemilan.org/past-events/">video</a></p><p><a href="https://www.slideshare.net/ds_mi/">slides</a></p><p>Written by Claudio G. Giancaterino</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d9e85489c9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>