<?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 Sanket Shah on Medium]]></title>
        <description><![CDATA[Stories by Sanket Shah on Medium]]></description>
        <link>https://medium.com/@sanketyou8?source=rss-11c454e69bd7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5_F_o6MBJgh42k17hivoKw.jpeg</url>
            <title>Stories by Sanket Shah on Medium</title>
            <link>https://medium.com/@sanketyou8?source=rss-11c454e69bd7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:52:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanketyou8/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[Continual Machine Learning]]></title>
            <link>https://medium.com/@sanketyou8/continual-machine-learning-fa907b915f30?source=rss-11c454e69bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa907b915f30</guid>
            <category><![CDATA[incremental-learning]]></category>
            <category><![CDATA[continual-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Sanket Shah]]></dc:creator>
            <pubDate>Sat, 04 Dec 2021 05:57:01 GMT</pubDate>
            <atom:updated>2021-12-06T03:55:02.766Z</atom:updated>
            <content:encoded><![CDATA[<h4>A beginner-friendly introduction…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kSw-njRsFwVlqbTElIX8oQ.jpeg" /></figure><blockquote>“The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.”</blockquote><blockquote>— Jean Baudrillard, French Sociologist</blockquote><p>As I like to do with most of my ideas, I will divide this article into two main parts. First, we try to understand <strong>the intuition behind continual learning</strong> and understand the philosophical viewpoints of the concept. I feel understanding intuition always helps us to openly think about the concept and its application so that its characteristics can effectively contribute towards easing the solution out rather than being just another forced application of it.</p><p>Building robust solutions is at the heart of the software industry, which reminds us that understanding only intuition isn’t going to take us anywhere. Hence, in the second part, we discuss some of the <strong>great libraries and modules</strong> which are out there which you can use to continually train your machine learning models.</p><p><strong>I will try my best to keep away from heavy technical language as much as possible in this article as I intend to give just a gentle introduction on the topic.</strong></p><h3>Intuition</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saj9MskdPCatdQ9D4co0ug.jpeg" /></figure><blockquote><strong>“Machine intelligence is the last invention that humanity will ever need to make.” -</strong> Nick Bostrom</blockquote><p>Philosopher at Oxford University and the author of the book <a href="https://www.amazon.in/Superintelligence-Dangers-Strategies-Nick-Bostrom/dp/0198739834">SuperIntelligence: Paths, Dangers, Strategies</a>, Nick Bostrom very concisely summarises the concept of Machine Learning, although very subtly. Machine learning, right from when it was first introduced to the extensive research in developing the basis of Artificial Intelligence, the goal has been to mimic the human brain and give the machines the capabilities that of a human. All the research in ML is aimed to reduce the gap between human capabilities and what the machine independently can achieve without human intervention. In fact, there are many aspects where it has surpassed human capabilities but that still will be just an isolated part of the human system where this feat has been achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0PH-FYpX5NHxAR7YBkcPQ.jpeg" /></figure><p>If we broadly try to classify Machine Learning into two parts, it will be — Computer Vision and NLP. In CV, we try to give the computer the capability of not just viewing objects and faces but recognising and remembering those objects or faces. On the other hand, NLP algorithms not only allow the computer to hear what is spoken but also try to understand the semantics of what is spoken and understand its underlying meaning. This shift from viewing to recognizing or the shift from hearing to understanding is the main goal of Machine Learning, which increases machines capabilities by adding <strong>“humanness”</strong> in the binary driven inanimate devices.</p><p>Just as we strive to become better humans, Machine Learning researchers try to make machines better humans or machines with capabilities even better than humans.</p><p>But if we try to understand most of the Machine Learning algorithms, there is a very important distinction between how humans learn and machines learn. <strong>I feel it is crucial to highlight this difference in order to understand continual learning.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6IFtG1kRAMDr7eHPUAYnA.jpeg" /></figure><h4>Let’s try to understand that by an example</h4><p>Say you build a face recognition system capable of recognizing 50 faces. So, now you train your model by giving these 50 faces sets. The training might take some time, but once the system is trained depending on how well the model is trained, it will be able to recognise your face, provided your model is trained with your face. This ability of the model can be loosely called the <strong>‘Knowledge base’</strong> of the model. This is very similar to showing a human 50 faces over and over again and asking her to recognise one of the faces from it. The ability to recognise the face will depend on how well is her “brain” trained with those faces. So far, we can see, how robust computer vision algorithms are successful in doing what a human brain can do.</p><p>But things become different when we want the same model to also remember 50 new faces. Here, we will have to retrain the model with the previous 50 faces and the new 50 face sets. The model now trains on these 100 images hence forgetting the previous knowledge of 50 faces. This introduces an overhead of retraining those 50 face sets. But on the other hand, the human brain would simply look at those new 50 faces and remember them and yet preserve the old knowledge of the faces, hence now can recognize all those 100 images. This difference is key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5564R4vvgkhmwYienuVxBw.jpeg" /></figure><p><strong>“Humans never stop learning”</strong>. Humans are dynamic. They adapt <strong>continually</strong> to changing environments and needs. This is something that current ML and Deep Learning Models lacked. <strong>Until Continual learning was introduced.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecvw5afSOc_EDtwBL4OsCw.jpeg" /></figure><p><strong>Continual Learning</strong> tries to bridge this gap. The usual learning methods that we tried to illustrate in our example are called <strong>“Batch Learning” </strong>methods. On the other hand, Continual Learning tries to make the ML models more dynamic and able to adapt to the changing needs of the system environment. This means we can add new knowledge on top of the current knowledge base without having to retrain the model. Now, this retraining comes with a cost.</p><p>Consider a scenario where the training data is coming in a stream of data. This data is to be used to update the knowledge base. Taking the batch learning approach will force us to let accumulate a certain amount of data, and then train the model completely. But, as the amount of knowledge base keeps on increasing the training time increases continuously. This would also mean that there will always be a “<strong>lag of knowledge”</strong> until the model is being trained on the complete training set. In certain applications where the model needs to be kept updated as and when new data comes in. This added time to train comes as an extra cost. In certain applications having streaming data or some live ML systems, this cost is very expensive. That is where continual learning can help. The continual learning pipelines are designed in such a way that each time a new data point is added to the model from the stream, the knowledge from that data point is added to the current base. Hence, at any moment when a prediction is made on the model, it will give its predictions based on the well-updated knowledge of the model. Hence, keeping the lag of knowledge to its bare minimum. As the model keeps on learning, we also call it <strong>“online learning”</strong> or <strong>“live learning” </strong>and also <strong>“incremental learning”</strong> in many cases as the model becomes better and better at each point<strong>.</strong></p><p>I think we now have a basic intuition of continual learning. We can now dive right in to the implementation of continual learning in your next ML model.</p><h3>Implementation</h3><p>Now let us try to see how can we incorporate continual learning in our projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fbJLkoi9Fm9QmjFAIFY0fg.jpeg" /></figure><p><strong>There are numerous libraries and packages out there which you can easily incorporate into your projects.</strong></p><ol><li>Scikit-Multiflow</li><li>Creme Project ( Now the River Project )</li><li>Amazon Sagemaker</li></ol><h4>1. Scikit-Multiflow</h4><p>A simple way to implement various online/continual classifiers in Python. <a href="https://towardsdatascience.com/incremental-online-learning-with-scikit-multiflow-6b846913a50b">This article</a> provides a really nice introduction to the library and steps to implement it in Python.</p><p><a href="https://towardsdatascience.com/incremental-online-learning-with-scikit-multiflow-6b846913a50b">Incremental (Online) Learning with Scikit-Multiflow</a></p><h4>2. Creme/River Project</h4><p>This is a very well maintained project by Max Halford and his colleagues. He is a PhD in Applied ML and a data scientist at Alan Eu. The result of a merger between creme and scikit-multiflow is now called the River project. You can check their repository out <a href="https://github.com/online-ml/river">here</a>. The documentation using the river module can be found here.</p><p><a href="https://riverml.xyz/latest/">river - River</a></p><h4>3. Amazon Sagemaker</h4><p>Amazon AWS provides various ML services which you can opt for. But it will always be important to consider its use when you are looking to scale your application and have the resources to subscribe to their services. You can find more details about it here. Check out the pricing <a href="https://aws.amazon.com/sagemaker/pricing/?nc=sn&amp;loc=3">here</a>.</p><p><a href="https://aws.amazon.com/sagemaker/">The center for all your data, analytics, and AI - Amazon SageMaker - AWS</a></p><h3>Final Thoughts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOLFirS0yJ2s28QpIQu6cA.jpeg" /></figure><p>Although online learning sounds like a very fascinating deal, It is very important to identify if it actually helps to make a better solution to your problem. Hence, a comparative analysis between online learning and batch learning is always the first thing I would recommend before deciding to use this in your next project. Every project has different priorities and as the scale of the project keeps on changing these priorities change too. For instance, a small academic project might not worry much about ML governance but a large scale ML application in a mature software institution might want to know why is the current prediction inconsistent and would want to pinpoint which data fed in the system caused it and get metadata such as when was it trained, what was the accuracy while training, etc. This would clearly not be possible using online learning. Hence, <strong>understanding the project heuristics become primary before taking the decision whether to use online learning or not.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa907b915f30" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>