<?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 Hrithik Raj on Medium]]></title>
        <description><![CDATA[Stories by Hrithik Raj on Medium]]></description>
        <link>https://medium.com/@hrithikraj_45881?source=rss-b4789a5d8e10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3VpJMo8hlTIqz_AY.</url>
            <title>Stories by Hrithik Raj on Medium</title>
            <link>https://medium.com/@hrithikraj_45881?source=rss-b4789a5d8e10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:45:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hrithikraj_45881/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[Key Notes About Some Basic OOPS Concepts [Part 1..]]]></title>
            <link>https://medium.com/@hrithikraj_45881/key-notes-about-some-basic-oops-concepts-part-1-50a6b25a02fd?source=rss-b4789a5d8e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/50a6b25a02fd</guid>
            <category><![CDATA[constructor]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Hrithik Raj]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 20:28:20 GMT</pubDate>
            <atom:updated>2019-01-27T20:28:20.880Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Constructors</strong></h3><ol><li>Constructor’s names are same as class name and it has no return type and it is used to initialize the object.</li><li>It can’t be final,static ,abstract and synchronized.</li><li>Constructor can’t be inherited.</li><li>Basically it is of three types No argument constructor ,Default constructor and Parametrized constructor.</li></ol><p><strong>Default constructor</strong>:- When there is no mention of constructor in source code but it is implicitly invoked by compiler during compilation.</p><pre>public class Hello {<br>   String name;<br>   //Constructor<br>   Hello(){<br>      this.name = &quot;BeginnersBook.com&quot;;<br>   }<br>   public static void main(String[] args) {<br>      Hello obj = new Hello();<br>      System.out.println(obj.name);<br>   }<br>}</pre><p><strong>Output:</strong></p><pre>BeginnersBook.com</pre><p><strong>No-arg constructor</strong>:-This means constructor is declared in source code without any arguments and under its body some initialization or code is written.</p><pre>class Demo<br>{<br>     public Demo()<br>     {<br>         System.out.println(&quot;This is a no argument constructor&quot;);<br>     }<br>     public static void main(String args[]) {<br>    	 new Demo();<br>     }<br>}<br>  Output:<br>This is a no argument constructor</pre><p><strong>Parametrized constructor</strong>:-The constructor with arguments.</p><pre>public class Employee {<br><br>   int empId;  <br>   String empName;  <br>	    <br>   //parameterized constructor with two parameters<br>   Employee(int id, String name){  <br>       this.empId = id;  <br>       this.empName = name;  <br>   }  <br>   void info(){<br>        System.out.println(&quot;Id: &quot;+empId+&quot; Name: &quot;+empName);<br>   }  <br>	   <br>   public static void main(String args[]){  <br>	Employee obj1 = new Employee(10245,&quot;Hrithik&quot;);  <br>	Employee obj2 = new Employee(92232,&quot;Rahul&quot;);  <br>	obj1.info();  <br>	obj2.info();  <br>   }  <br>}</pre><p><strong>Output:</strong></p><pre>Id: 10245 Name: Hrithik<br>Id: 92232 Name: Rahul</pre><p>5. Constructors can have any access specifier but when we talk about private constructors then they can be used under scope of class.</p><p>6.Interfaces don’t have constructors.</p><p>7.Just like constructor methods can have same name as class name the major difference is methods can have return type.</p><p>8.A constructor can invoke another constructor of the same class by using <strong>this()</strong> function.</p><p>9. Constructor can be used for copying of object.Ex:-</p><pre>class JavaExample{  <br>   String web; <br>   JavaExample(String w){  <br>	web = w;<br>   }  <br><br>   /* This is the Copy Constructor, it <br>    * copies the values of one object<br>    * to the another object (the object<br>    * that invokes this constructor)<br>    */<br>   JavaExample(JavaExample je){  <br>	web = je.web; <br>   }  <br>   void disp(){<br>	System.out.println(&quot;Website: &quot;+web);<br>   }  <br><br>   public static void main(String args[]){  <br>	JavaExample obj1 = new JavaExample(&quot;JavaBook&quot;);  <br>		<br>	/* Passing the object as an argument to the constructor<br>	 * This will invoke the copy constructor<br>	 */<br>	JavaExample obj2 = new JavaExample(obj1);  <br>	obj1.disp();  <br>	obj2.disp();  <br>   }  <br>}</pre><p>Output:</p><pre>Website: JavaBook<br>Website: JavaBook</pre><p>10.<strong>this() and super() should be the first statement in the constructor code.</strong> If you don’t mention them, compiler does it for you accordingly.</p><p>11.Constructor overloading is possible but not overriding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50a6b25a02fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detailed Walk through Of Machine Learning Algorithms [Part 2…]]]></title>
            <link>https://medium.com/@hrithikraj_45881/detailed-walk-through-of-machine-learning-algorithms-part-2-12b3c8438298?source=rss-b4789a5d8e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/12b3c8438298</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Hrithik Raj]]></dc:creator>
            <pubDate>Sat, 26 Jan 2019 13:09:13 GMT</pubDate>
            <atom:updated>2019-01-26T13:09:13.604Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>LOGISTIC REGRESSION</strong></h3><p>A data-set with one or more independent features is used to determine the binary classification of the dependent variable. For example very popular data-set i.e Titanic data-set in which we have to predict whether particular passenger survived or not.</p><p>Before heading towards practical implementation of this model lets look at the mathematical intuition behind this model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YsEZTmK3UalqAVEFKvQuoA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3IH32Z5a1xVxoNzI4VFbWw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spUbMa446RhWmdiSr6onqw.jpeg" /></figure><h3>Difference between Linear Regression and Logistic Regression</h3><p><strong>Linear Regression</strong></p><ul><li>Use to solve Regression problems.</li><li>The response variables are continuous in nature</li><li>It helps estimate the dependent variable when there is a change in the independent variable.</li><li>It forms a straight line.</li></ul><p><strong>Logistic Regression</strong></p><ul><li>Use to solve Classification problem</li><li>The response variable are discrete in nature.</li><li>It helps in calculating the possibility of a particular event taking place.</li><li>It forms a S-curve.(S=Sigmoid)</li></ul><p>here is the link of implementation of prediction of handwritten-digits using logistic regression:</p><p><a href="https://github.com/Hrraj5/ML-assignments/blob/master/Logistic%20regression%20Analysis.ipynb">https://github.com/Hrraj5/ML-assignments/blob/master/Logistic%20regression%20Analysis.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12b3c8438298" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brief Walk Through of Object Oriented paradigms.]]></title>
            <link>https://medium.com/@hrithikraj_45881/brief-walk-through-of-object-oriented-paradigms-7c3ed7ca351b?source=rss-b4789a5d8e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c3ed7ca351b</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[oops-concepts]]></category>
            <dc:creator><![CDATA[Hrithik Raj]]></dc:creator>
            <pubDate>Mon, 21 Jan 2019 18:24:04 GMT</pubDate>
            <atom:updated>2019-01-21T19:17:50.793Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*Wi8cul1GTDJIcmSENrYxUQ.png" /></figure><p>A popular interview questions that concerns the four most important corners of Object oriented programming ,these concepts are encapsulation, abstraction ,inheritance and polymorphism. Lets look at each of these concepts!</p><p>In oops we combine a group of related variables and functions into a unit we call that an object.We refer to this variables as properties and functions as methods.</p><h3><strong>Encapsulation</strong></h3><p>In oops we group related variables and functions that operate on them into objects and this is called encapsulation.In other words,encapsulation means wrapping data and code into a single unit .It is also known as data hiding.Ex:-</p><pre>class Encapsulation{<br>    private int id;<br>    private String empName;<br>    private int empAge;<br><br>    //Getter and Setter methods<br>    public int getEmpid(){<br>        return ssn;<br>    }<br><br>    public String getEmpName(){<br>        return empName;<br>    }<br><br>    public int getEmpAge(){<br>        return empAge;<br>    }<br><br>    public void setEmpAge(int newValue){<br>        empAge = newValue;<br>    }<br><br>    public void setEmpName(String newValue){<br>        empName = newValue;<br>    }<br><br>    public void setEmpid(int newValue){<br>        ssn = newValue;<br>    }<br>}<br>public class EncapsTest{<br>    public static void main(String args[]){<br>         Encapsulation obj = new Encapsulation();<br>         obj.setEmpName(&quot;Hrithik&quot;);<br>         obj.setEmpAge(23);<br>         obj.setEmpid(111);<br>         System.out.println(&quot;Employee Name: &quot; + obj.getEmpName());<br>         System.out.println(&quot;Employee ID: &quot; + obj.getEmpid());<br>         System.out.println(&quot;Employee Age: &quot; + obj.getEmpAge());<br>    } <br>}<br>output:-<br><strong>Employee Name: Hrithik<br>Employee ID: 111<br>Employee Age: 32</strong></pre><p>In above code the access specifier of variables are private and public for methods.Advantage of encapsulation is re-usability,flexibility and maintainability.</p><h3><strong>Abstraction</strong></h3><p>In this we hide some of the properties and methods and from the outside and this gives us two benefits one is it makes simpler interface as with a few properties and methods is easier to understand than interface with lots of properties and methods. Second useful benefit is we can change the parameter or delete any methods when there is no use without facing any greater impact of change to the whole code.Ex:-</p><pre>abstract class Animal{<br>   //abstract method<br>   public abstract void sound();<br>}<br>//Dog class extends Animal class<br>public class Dog extends Animal{<br><br>   public void sound(){<br>	System.out.println(&quot;Whaw Whaw&quot;);<br>   }<br>   public static void main(String args[]){<br>	Animal obj = new Dog();<br>	obj.sound();<br>   }<br>}<br>Note:- we cant create objects of abstract class because abstract class is incomplete and when we create objects it tries to invoke method which is incomplete.</pre><h3>Inheritance</h3><p>It is a mechanism which allows you to reduce duplicate code.In other words when one class acquire properties and methods from another class.There are five types of inheritance</p><ol><li>Single inheritance</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*figTYEDKipnIXKGy15twww.jpeg" /></figure><p>2.Multiple inheritance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*sHtEu5pvBnc1lXp1Ab6C8A.jpeg" /></figure><p>3.Multilevel inheritance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*tiiQS3tDoatzJrp75HTv9g.jpeg" /></figure><p>4. Hierarchical inheritance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*grkNEaS0elZkfImKcHBbTg.jpeg" /></figure><p>5.Hybrid inheritance</p><p>Ex:-</p><pre>class Teacher {//Parent class<br>   String designation = &quot;Teacher&quot;;<br>   String collegeName = &quot;KIIT UNIVERSITY&quot;;<br>   void work(){<br>	System.out.println(&quot;Teaching&quot;);<br>   }<br>}<br><br>public class OOSDTeacher extends Teacher{//child class<br>   String mainSubject = &quot;OOSD&quot;;<br>   public static void main(String args[]){</pre><pre>	OOSDTeacher obj = new OOSDTeacher();<br>	System.out.println(obj.collegeName);<br>	System.out.println(obj.designation);<br>	System.out.println(obj.mainSubject);<br>	obj.work();<br>   }<br>}<br>OUTPUT:-<br>KIIT UNIVERSITY<br>Teacher<br>OOSD<br>Teaching</pre><h3><strong>Polymorphism</strong></h3><p>It is one of the OOPs feature that allows us to perform a single action in different ways.ex:-</p><pre>public class Animal{<br>   public void sound(){<br>      System.out.println(&quot;Animal is making a sound&quot;);   <br>   }<br>}<br>class Horse extends Animal{<br>    @Override<br>    public void sound(){<br>        System.out.println(&quot;Neigh&quot;);<br>    }<br>    public static void main(String args[]){<br>    	Animal obj = new Horse();<br>    	obj.sound();<br>    }<br>}<br>public class Cat extends Animal{<br>    @Override<br>    public void sound(){<br>        System.out.println(&quot;Meow&quot;);<br>    }<br>    public static void main(String args[]){<br>    	Animal obj = new Cat();<br>    	obj.sound();<br>    }<br>}<br>Output:-<br>Neigh<br>Meow</pre><p>Source:-beginnersbook.com,YouTube.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c3ed7ca351b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detailed Walk Through of Machine Learning Algorithms]]></title>
            <link>https://medium.com/@hrithikraj_45881/detailed-walk-through-of-machine-learning-algorithms-2794349932a4?source=rss-b4789a5d8e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/2794349932a4</guid>
            <category><![CDATA[naive-bayes]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Hrithik Raj]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 12:19:36 GMT</pubDate>
            <atom:updated>2019-01-26T13:11:36.458Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Detailed Walk Through of Machine Learning Algorithms[Part 1…]</strong></h3><p><strong><em>NAIVE BAYES ALGORITHM-</em></strong></p><p>Have you ever wondered how your mail provider implements spam filtering? or how online news channels performs news text classification? or how companies perform sentiment analysis of their audience on social media .All of this can be done through Naive Bayes algorithm.So let’s get started!</p><p>What is Naive Bayes?</p><p>Naive Bayes classifier works on the principle of conditional probability as given by the Bayes theorem.</p><p>Bayes theorem gives the conditional probability of an event A given another event B has occurred<strong>.</strong></p><p><strong>P(A|B)=(P(B|A)P(A))/P(B) ,</strong></p><p><strong>where P(A|B)= Conditional probability of A given B</strong></p><p><strong>P(A|B)= Conditional probability of B given A</strong></p><p><strong>P(A)=Probability of A</strong></p><p><strong>P(B)=Probability of B</strong></p><p>Bayes theorem basically calculates the conditional probability of the occurrence of an event based on prior knowledge of conditions that might be related to the event.</p><p><strong>Mathematical intuition to understand Naive Bayes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRU4XctCtpV4QPppRtVA-g.jpeg" /><figcaption>Shopping Data Set</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUjJA5w0OhCvu4zuOFNsqQ.jpeg" /><figcaption>Frequency Table of each column attributes “Discount”, “Free Delivery”, “Day”.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rKY5eBLjMStZUeeguIGwFg.jpeg" /><figcaption>Probability of “No Buy” has been found when Probability of “Week day” has been given by applying naive Bayes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vKBZd6gw9CXtgUPyNn-vrg.jpeg" /><figcaption>Similarly probability of each frequency table has been calculated.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ZHfyjN2xKFFrqaGwH3DKg.jpeg" /><figcaption>An unseen example has been taken.</figcaption></figure><h3><strong>Advantages of Naive Bayes Classifier:-</strong></h3><ol><li>Very simple and easy to implement.</li><li>Needs less training data.</li><li>Handles both continuous and discrete Data</li><li>Highly scalable with no. of predictors and data points.</li><li>As it is fast,it can be used in real time predictions.</li><li>No sensitive to irrelevant features.</li></ol><p>Here is the github link for analysis of Naive Bayes:-</p><p><a href="https://github.com/Hrraj5/ML-assignments/blob/master/Naive%20Bayes%20Analysis.ipynb">Hrraj5/ML-assignments</a></p><p>Link to part 2:</p><p><a href="https://github.com/Hrraj5/ML-assignments/blob/master/Logistic%20regression%20Analysis.ipynb">https://github.com/Hrraj5/ML-assignments/blob/master/Logistic%20regression%20Analysis.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2794349932a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key Intuition about AlexNet Architecture]]></title>
            <link>https://medium.com/@hrithikraj_45881/key-intuition-about-alexnet-architecture-b045f7aaceb9?source=rss-b4789a5d8e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/b045f7aaceb9</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[convolutional-network]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Hrithik Raj]]></dc:creator>
            <pubDate>Fri, 04 Jan 2019 18:26:38 GMT</pubDate>
            <atom:updated>2019-01-04T18:26:38.408Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>AlexNet Architecture:-</strong></h3><ul><li>This architecture consists of 60 million parameters ,650000 neurons ,five convolutional layer followed by some max pool layer ,three fully connected layer with a final 1000-way softmax.</li><li>In this architecture non saturating neurons(relu function) and GPU implementation has been used to make training faster.</li><li>A regularization method known as “dropout” has been utilized to minimize the over-fitting in fully connected layer.</li></ul><h3><strong>HIGHLIGHTS OF THE PAPER</strong></h3><h4><strong>ReLU(Rectified Linear Unit) Non-Linearity</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*29VH_NiSdoLJ1jUMLrURCA.png" /><figcaption><strong>tanh v/s relu</strong></figcaption></figure><ul><li>Almost now days every convolutional layer uses relu activation function.</li><li>In terms of training time with gradient descent,the function like tanh are much slower than Relu.</li><li><strong>f(x)=max(0,x)</strong></li><li><strong>Range =[0,infinity)</strong></li><li>It has been seen that on a particular four-layer convolutional layer relu reaches 25% error rate six times faster than the tanh on a CIFAR-10 data set.</li></ul><h3>Overlapping Pooling</h3><ul><li>It means when s&lt;z where s=Stride and z=filter.</li><li>This is what have been applied to the paper where s=2 and z=3.This scheme has reduces the top one error and top five error by 0.4% and 0.3 % respectively.</li><li>It has been observed that by applying overlapping pooling it becomes difficult to overfit.</li></ul><h3><strong>Overall Architecture</strong></h3><p>[227*227*3]Input size: No. of channels =3.</p><p>[55*55*96]Conv1+ReLU:96 (11*11) filters and stride=4,padding=0.</p><p>[27x27x96] MAX POOL1: 3x3 filters at stride 2</p><p>[27x27x256] CONV2+ReLU: 256 5x5 filters at stride 1, pad 2</p><p>[13x13x256] MAX POOL2: 3x3 filters at stride 2</p><p>[13x13x384] CONV3+ReLU: 384 3x3 filters at stride 1, pad 1</p><p>[13x13x384] CONV4+ReLU: 384 3x3 filters at stride 1, pad 1</p><p>[13x13x256] CONV5+ReLU: 256 3x3 filters at stride 1, pad 1</p><p>[6x6x256] MAX POOL3: 3x3 filters at stride 2 [4096]</p><p>FC6+ReLU: 4096 neurons [4096]</p><p>FC7+ReLU: 4096 neurons [1000]</p><p>FC8+ReLU: 1000 neurons (class scores)</p><h3><strong>Dropout</strong></h3><ul><li>To reduce overfitting recently a technique has been developed called ‘dropout’.</li><li>This means the neurons which are dropped out doesn’t contribute in forward feed and backward propagation.</li></ul><h3><strong>Learning Details</strong></h3><ul><li>dropout 0.5</li><li>batch size 128</li><li>SGD(Stochastic Gradient Descent)</li><li>Momentum 0.9</li><li>Learning rate 1e-2, reduced by 10</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b045f7aaceb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>