<?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 Jakki Seshapanpu on Medium]]></title>
        <description><![CDATA[Stories by Jakki Seshapanpu on Medium]]></description>
        <link>https://medium.com/@sjakki?source=rss-b2537f3ecdd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FdpdU2Wi2R2Q-3UT</url>
            <title>Stories by Jakki Seshapanpu on Medium</title>
            <link>https://medium.com/@sjakki?source=rss-b2537f3ecdd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 05:22:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sjakki/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[Classification of Fashion-MNIST using Deep Learning]]></title>
            <link>https://medium.com/@sjakki/classification-of-fashion-mnist-using-deep-learning-3937f2b5293e?source=rss-b2537f3ecdd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3937f2b5293e</guid>
            <category><![CDATA[tensorboard]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[fashion-mnist]]></category>
            <category><![CDATA[google-colab]]></category>
            <dc:creator><![CDATA[Jakki Seshapanpu]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 18:49:07 GMT</pubDate>
            <atom:updated>2020-09-02T05:03:34.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*GNLB2jtcfb_xTqgQd9ntJA.png" /></figure><h3><strong>Data Set :</strong></h3><p><a href="https://github.com/zalandoresearch/fashion-mnist">Fashion-MNIST</a> dataset is used in this article for solving a classification problem using the Deep Learning.</p><p>This dataset has a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28 x 28 gray scale image, associated with a label from 10 classes</p><p><strong>Each training and test examples is assigned to one of the following labels:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*iR-uFxDs-grFiUUGIOuCgQ.png" /></figure><h3><strong>Exploratory Data Analysis:</strong></h3><p>Basic exploration of the dataset is done and plotted some images ( as shown below):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*Wdfid4IFPuMU7eR80zTFxw.png" /></figure><h3><strong>Model Creation :</strong></h3><p>This is a classification problem, so we have to normalize the pixel values before passing them to the model. Created a “Sequential” model, added the input layer after flattening the input shape. Added hidden layer with “relu” activation function and added final output layer with “softmax” activation function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G3TBuVqncmy0x8XHMJ9fjA.png" /></figure><h3><strong>Model Training :</strong></h3><p>Used “SparseCategoricalCrossentropy” loss function, because this is a multi class problem ( we have to classify into ten different categories)</p><p>Used “Adam” optimizer here. The learning rate in Adam optimizer is adapted as learning unfolds ( in case of Stochastic gradient descent the learning rate does not change during the training ). Adam method computes individual adaptive learning rates for different parameters from estimates of first and second moments of the gradient. Adam realizes the benefits of both AdaGrad( Adaptive Gradient Algorithm ) and RMSProp ( Root Mean Square Propagation ).</p><p>Compile method links the optimizer, loss function and metrics to the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4uQ3Lw9pa-O39BEK163JQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJTi6gPjmMs5xM26P1EnoQ.png" /></figure><p>From the above we can notice that model stopped training after 14th epoch (i.e. before maximum specified epochs 25) in this case. The validation loss decreased up to 11th epoch and started increasing after that, so the model continued training and monitored up to another 3 more epochs, whether validation decreases or not. As the validation loss is not decreased further, the model stopped training and restores the best weights of the model (i.e. weights at 11th epoch in this case). The same has been illustrated below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wZ-xh_Auen1tMxTfJNWp2g.png" /></figure><h3>Model Performance :</h3><p>We got around 86% accuracy and validation loss is around 1.59.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*ZgkGh-Xiii3M75PQRK2Mdw.png" /></figure><p>Plotted some random images from our predictions. The predicted and test labels are as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*Ig-R2Z6HnC8pJG1TV5sV3g.png" /></figure><p>Model did well in this scenario and the classification worked well. Further improvements can be done to reduce the validation loss and improve the accuracy.</p><p>Code implementation available <a href="https://github.com/Jakki-SP/Publications/blob/master/Classifier_Using_Keras_FMNIST.ipynb">here</a> .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3937f2b5293e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vanishing and Exploding Gradients in Neural Networks]]></title>
            <link>https://medium.com/@sjakki/vanishing-and-exploding-gradients-in-neural-networks-5b3ee108a568?source=rss-b2537f3ecdd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b3ee108a568</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[exploding-gradient]]></category>
            <category><![CDATA[vanishing-gradient]]></category>
            <category><![CDATA[gradient-descent]]></category>
            <dc:creator><![CDATA[Jakki Seshapanpu]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 02:40:54 GMT</pubDate>
            <atom:updated>2020-08-16T02:40:54.172Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Brief Overview</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*hvUGQ7VkUGHuAjNqYLE_pQ.png" /><figcaption>Image source : <a href="https://doi.org/10.1093/eurheartj/ehz056">https://doi.org/10.1093/eurheartj/ehz056</a></figcaption></figure><h3>What is a Gradient ?</h3><p>The Gradient refers to the gradient of loss function with respect to the weights. We calculate the Gradient during the back propagation in Recurrent Neural Networks. These Gradients are used to update the weights, to minimize the loss function.</p><p>With the back propagation we may come across two issues mainly:</p><ul><li>Vanishing Gradient</li><li>Exploding Gradient</li></ul><h3>Vanishing Gradient :</h3><p><em>Vanishing Gradient occurs when the gradient becomes very small.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*xeFwjKBVbdTXBrQQAn0Krw.png" /><figcaption>Image source : javepoint</figcaption></figure><p>Vanishing gradient problem is common while training the deep neural networks. Adding more hidden layers make the network able to learn the more complex functions and does a better job in predicting future outcomes. But during the back propagation and calculating the gradients, it tends to get smaller and smaller as as we keep on moving backward in the network. This causes the neurons in the earlier layers learn very slowly as compared to the neurons in the later layers. The gradients will be very small for the earlier layers, means there is no major difference between the new weight and old weight. This leads to vanishing gradient problem.</p><p>The deterioration in the gradient value is proportional to the depth of the network. The deeper the network, the chance of getting a lesser value of the gradient towards the end of back propagation.</p><p>Vanishing gradient problem is mainly occurs with sigmoid and tanh functions. We can avoid this problem by using the ReLU activation functions in training the deep neural networks.</p><h3><strong>Exploding Gradient :</strong></h3><p><em>Exploding Gradient occurs when the gradient becomes very large.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*c5Vl0tGsX1zkC6Jlst2R_A.png" /><figcaption>Image source : javapoint</figcaption></figure><p>If the gradient becomes large, the model becomes unstable and model unable to learn from the training data. Exploding gradient problem can be identified if there is large changes in the loss from update to update. If the model loss goes to NaN during the training is an indication of exploding gradient problem.</p><p>Exploding gradient problem is due to large weights.</p><p>Exploding Gradient Problem can be address by :</p><ol><li>By using the Long Short-Term Memory(LSTM) networks</li><li>Using the Gradient Clipping ( by setting threshold)</li><li>Using the Weight Regularization</li><li>Re-design the model with fewer layers</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b3ee108a568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Algorithms]]></title>
            <link>https://medium.com/analytics-vidhya/machine-learning-algorithms-b8e182cbdf94?source=rss-b2537f3ecdd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8e182cbdf94</guid>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[regression-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Jakki Seshapanpu]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 02:42:37 GMT</pubDate>
            <atom:updated>2020-08-11T08:06:38.016Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>- A brief overview</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*DEnuJuZlZnt_RoAfgPj6Gw.jpeg" /></figure><h3><strong>What is Machine Learning?</strong></h3><p>Arthur Samuel (1959): “Field of study that gives computers the ability to learn without being explicitly programmed”.</p><p>Tom Mitchel (1997): “A computer program is said to learn if its performance at a task T, as measured by a performance P, improves with experience E”.</p><h3><strong>What type of machine learning algorithms to use?</strong></h3><p>Selecting a right machine-learning algorithm depends on several factors, including the data size, quality and nature of data. Choosing the right algorithm is both a combination of business need, specification, experimentation and time available. Here we will explore different machine learning algorithms.</p><p>There are four types of Machine Learning algorithms, they are:</p><ul><li>Supervised Learning</li><li>Semi-supervised Learning</li><li>Unsupervised Learning</li><li>Reinforcement Learning</li></ul><h3>Supervised Learning:</h3><p>In supervised learning, we provide a known dataset that includes inputs and desired outputs. The machine finds a way to determine the outputs at the given set of inputs.</p><p>The types of Supervised Learning Algorithms are:</p><p><strong>A. Classification:</strong> This machine learning algorithm will draw a conclusion from the observed values and determine to which category the new observation belongs.</p><p>Here are the different classification algorithms:</p><p><strong>1.Logistic Regression:</strong> Logistic Regression is used to predict the probability of a target variable. The nature of target or dependent variable is dichotomous, which means there would be only two possible classes (0 or 1).</p><blockquote>Type of Logistic regression:</blockquote><blockquote><strong>a. Binary or Binomial:</strong> The dependent variable will have only two possible type (0 or 1).</blockquote><blockquote><strong>b. Multinomial:</strong> Dependent variable can have three or more possible unordered types or the types having no quantitative significance. For example, “Type A” or “Type B” or “Type C”.</blockquote><blockquote><strong>c. Ordinal:</strong> Here the dependent variable can have three or more possible ordered types or the types having a quantitative significance. For example T-shirt sizes, “small”, “medium”, “large”, “extra-large” etc.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*zOA-9IzFLjVZ9HqB_SKCtw.png" /></figure><p><strong>2. Naive Bayes Classifier Algorithm:</strong> The Naive Bayes classier is based on Bayes’ theorem and classifies every value as independent of any other value. It allows us to predict a category, based on a given set of features, using the probability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*mYbKnfxldig8pP7mX7KrCA.png" /></figure><p><strong>3. Support Vector Machine:</strong> SVM essentially filter data into categories, which is achieved by providing the training examples, each set marked as belonging to one or the other of the two categories. The algorithm then works to build a model that assigns new values to one category or the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Fjj7EblDs2J88GgJmyKL8w.png" /></figure><p><strong>4. Decision Trees</strong>: Decision Trees can be used to solve both regression and classification problems. It is flow chart like tree structure that use a branching method to illustrate every possible outcome of a decision. Each node within the tree represents a test on a specific variable and each branch is the outcome of that test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*U6twhNSe1I37feFfBaeXLw.png" /><figcaption>Source : aitimejournal</figcaption></figure><p><strong>5. Random Forests:</strong> It is an ensemble learning method, combining multiple algorithms to generate better results for classification, regression and other tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*6r7FJCznsio0uEdcWz5ypw.png" /><figcaption>source : Javapoint</figcaption></figure><p><strong>6. Nearest Neighbors: </strong>The K Nearest neighbor algorithm estimates how likely a data point is to be a member of one group or another. It essentially looks at the data points around a single data point to determine what group it is actually in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*9h-WczF6csbeut5vsvjSUA.gif" /></figure><p><strong>B. Regression:</strong> Regression Analysis consists of a set of machine learning methods that allow us to predict a continuous outcome of variable based on the value of the one or multiple predictor variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*eRqtnWb6MRPnA22BIekSEw.png" /></figure><p><strong>C. Forecasting:</strong> Here we make future predictions based on the past and present data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*Sr9bfPyQ7Arv4m2Z7HErIw.png" /></figure><h3><strong>Semi-Supervised Learning:</strong></h3><p>Semi-supervised learning is an approach to machine learning that combines a small of amount of labeled data with a large amount of unlabeled data during the training. The machine will understand and develops the algorithm from the given labeled data and try to predict the labels for the new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*TgeL4f4lOJZb_CkFxEYDAQ.png" /></figure><h3><strong>Unsupervised learning:</strong></h3><p>Unsupervised machine learning algorithms infer patterns from the dataset without reference to known or labeled outcomes. Unlike supervised learning, unsupervised learning can’t be applied to a regression or a classification problem because we have no information about the output data. So the unsupervised learning used to determine the underlying pattern of the data.</p><p>The types of unsupervised learning are:</p><ol><li><strong>Clustering:</strong> Clustering is the assignment of a set of observations into subsets so that observations in the same cluster are similar type.</li><li><strong>K Means Clustering Algorithm:</strong> It is used to categories unlabeled data, i.e. data without defined categories or groups. The algorithm works by finding groups within the data, with the number of groups represented by the variable K. It then works iteratively to assign each data point to one of K groups based on the features provided.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*eNWN14P6oQwySgxLuMqB9g.png" /></figure><p><strong>3. Dimension reduction: </strong>Dimension reduction reduces the number of variables being considered to find the required information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*uDQVxBl2gN3ztv3naowT_A.png" /></figure><h3><strong>Reinforcement Learning:</strong></h3><p>Reinforcement learning is a type of dynamic programming that trains algorithms using a system of reward and punishment. A reinforcement-learning algorithm, or agent, learns by interacting with its environment. The agent receives rewards by performing correctly and penalties for performing incorrectly. Therefore, it learns from experiences and begins to adapt its methodology in response to the situation to achieve the best potential outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*JFWZOoEOirrkM_0Vlu7F9Q.jpeg" /></figure><p><strong>Artificial neural networks (ANNs): </strong>These are computing systems inspired by the biological neural networks of the human beings. An ANN is based on a collection of connected units or nodes called artificial neurons, which loosely model the neurons in a biological brain. Each connection, like synapses in a biological brain, can transmit a signal to other neurons. ANNs also learn by example and through experience, and they are extremely useful for modelling non-linear relationships in high dimensional data or where the relationship among the input variables is difficult to understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V41ZtjuCDCcfE6N5851gFQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8e182cbdf94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/machine-learning-algorithms-b8e182cbdf94">Machine Learning Algorithms</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>