Showing posts with label Artificial intelligence. Show all posts
Showing posts with label Artificial intelligence. Show all posts

Monday, July 29, 2019

Linear Regression 20 | Mean Square Error(MSE)

Lesson - 4



 Linear Regression 20 | Mean Square Error(MSE)




Hey! Welcome back ML enthusiasts today we gonna dive deep into the most important and most misunderstood topics mean square error and linear regression.

what misunderstood!

hahaha, ya linear regression is tuff in other articles and video courses out there but don't worry I'll make linear regression simple for you so excited to learn, that's the spirit lets go...


As we learned before that a model is something that learns from data and there are lots of complected model types out there. 

Q. OMG this means that we have lots of interesting ways to learn from data?
ans. the answer is a big Yes.



So today we are going to start with a very simple and familiar model that is linear regression this will open the gateway to more sophisticated methods.


It's long been known that in real estate the housing prices increase with the increase of per sq unit land.


ok then let's verify this fact by building a model.




multiple linear regression algorithm
linear regression

now in the picture above you can three things clearly...

1. x-axis:  denoting the input features that are nothing but the plot size in per square foot.

2. y-axis:  denoting the other output feature that is nothing but the house price.

3. dots: these multiple dots denote the training data given to our model.

Q.  what a single dots represent?
ans. here each red dot represents a house with its X and Y coordinates.
where X is hosing in sq ft and Y is housing price.

Q. how to know where to place a dot?
ans. umm... that's a good question.
as we learn earlier in supervised learning to train a model we have to give it input data and output data as well. so each house has co-ordinates  X(hosing in sq ft) and Y(housing price) they can be denoted as a house(x,y) put the value of x and y you get the position of each dot.


now put a little line...


multiple linear regression algorithm
linear regression

this line is now a model that predicts multiple housing prices.
so, as we can clearly notice that in the graph as the land size increases the prices of houses also get increased.

now if we give our model a house lets say of size X sq ft then the model predicts its price for us 😃😃



so the problem got resolved and I am pretty sure you get a full understanding of how this linear regression model works.


now let's cover some mathematical portion also...

according to our high school algebra, the equation of a line is...


where y is the house price
m is the slope 
b is the y-intercept
x is the housing in sq ft

but in machine learning its looks like this........

Multiple Linear Regression
y' is the label
b is the y-intercept
m is the slope replaced by w1 now called weight 
x1 its a feature

for multiple linear regression add this eq multiple times
Multiple Linear Regression



Q. how do we know if we have a good line?
ans. well for that we want to think of some notion called loss. 
loss is basically plenty for bad prediction. the predicted model is perfect if the loss is zero.
and greater otherwise our aim is to keep the loss as minimized as we can.


mean square error multiple linear regression
loss in linear regression
                 
in the image above these guys which are farther have some moderate size loss, these guys which are on the line have exactly-zero loss and these guys which are just touching the line have near-zero loss. 

note: loss is always positive or zero.


Q. How might we define loss in linear regression?
ans. well, that's something we have to think about in a slightly more mathematical way...

loss  = (original outcome)  - (model outcome)

        = observation(y) - predicted value(y') 

so, Loss = y - y'


In ml, we define loss function as L2
therefore L2= (y - y')^2.

MSE(mean square error) it is the average squared loss in the whole dataset 
Linear Regression

 MSE is most commonly used in ml.





                         Q & A                          

Q. which one is the linear regression algorithm?

ans. the last one is MSE.

Q. can you give us a linear regression pdf?
ans. ya, ya sure drop your emails.





hope uhh guys understand every concept if not do mention in comments below 👇👇👇👇



Thanks!!! for Visiting Asaanhai or lucky5522  😀😀





Wednesday, July 24, 2019

Why this is best machine learning course?

Best machine learning course



Intro


Have you heard people talking about machine learning but only have a fuzzy idea of what that means? Are you tired of nodding your way through conversations with co-workers? Let’s change that!







That’s what this is......




➥  Lesson 1 


  Lesson 2


  Lesson 3


  Lesson 4


  Lesson 5


   Lesson 6
                (cooking.......)


Best machine learning course



Thanks!!! for Visiting Asaanhai or lucky5522  😀😀

Friday, July 19, 2019

Types of machine learning | supervised, unsupervised, semi-supervised and reinforcement


 Lesson - 2

supervised, unsupervised, semi-supervised and reinforcement learning

TYPES OF MACHINE LEARNING


types of machine learning algorithm


So as mention above we basically have four types of classification in machine learning algorithms you probably thinking that what the hack was these types so let's understand them one by one...



Supervised learning


def:: "supervised learning is when the model gets trained on the labeled dataset".

More simply we can say that in supervised learning the computer is presented with input data and their desired output data as well.
now, you may ask what that labeled data set actually is AAA okay, a label is nothing but a tag like an apple, cat, table, etc.


example 1- suppose we want to sum two numbers so instead oftelling the machine that the formula for adding two numbers is a + b. insted we give it some input data like if a=2 ,b=3 and the output is 5 and if a=4,b=5 then output is 9  so now if we ask the machine what is the output of a=2,b=5 then it automatically gives us a output based on what the machine learns from the above two sample data. if it is the desired output that is 7 then the given examples are enough but what if the answer is some other number then 7 so now its time to provide more input data to machine.

example 2- suppose you are given a basket filled with different kinds of fruits. Now the first step is to train the machine with all different fruits one by one like this:


types of machine learning in artificial intelligence



   If shape of object is rounded and depression at top having color Red then it will be labeled as –Apple.

  If shape of object is long curving cylinder having color Yellow then it will be labeled as –Banana.

Now suppose after training the model(machine), you have given a new separate fruit say Banana from basket and asked to identify it.
different types of machine learning algorithms

Since the machine has already learned the things from previous data and this time have to use it wisely. It will first classify the fruit with its shape and color and would confirm the fruit name as BANANA and put it in Banana category. Thus the machine learns the things from training data(basket containing fruits) and then apply the knowledge to test data(new fruit).


I guess now you get a fair idea what this supervise learning thing is OK buddies its time to explorer the subparts of supervised learning lets understand them too...

Supervised learning is classified into two categories of algorithms
:

1.Classification:
4 types of machine learning algorithms

"A classification model predicts discrete values"                              OR                          
More easily we can say that a classification problem is when the output variable is a category, such as “Red” or “blue” or “disease” and “no disease”.                                           
For example, classification models make predictions that answer questions like the following:                
➤ Is a given email message spam or not spam?          
➤ Is this an image of a dog, a cat, or a hamster?                                                                                                                                               
2.Regression:
supervise learning
  "A regression model predicts continuous values"                   OR                             
A Regression problem is when the output variable is a real value, such as “dollars” or “weight”.
For example, regression models make predictions that answer questions like the following:
➤ What is the value of a house in California?
➤ What is the probability that a user will click on this ad?



okay, now I am pretty much sure that your doubts about supervise learning get resolved if not you can always ask in the comment section.

ooh I got this you do not get the full understanding of regression and classification plus the diagram provided makes the situation even worse. 
don't worry about those confusing diagrams we'll cover them in detail in a separate article.

let's move on to the next section that is unsupervised learning.


Unsupervised learning:



def:: "unsupervised learning is when no labels are given to the learning algorithm, leaving it on its own to find structure in its input".

pretty difficult huh.. let's make it simple okay so unlike supervised learning,  in unsupervised learning there is no prior training provided to the algorithm, therefore, the machine is restricted to find hidden patterns in the unlabeled data.
this means here we don't tell the machine that this is an apple or banana
the machine should figure it out on its own. 


example 1: suppose we have an image having cats and dogs both but the machine never seen it before now the twist here is that in supervise learning we train the algorithm how cat is different from dog but in unsupervised learning we do not give the algorithm any prior training  in addition ask the algorithm to classify them based on its own understanding


unsupervise learning
thus the machine have no idea about the features of dogs and cats so it can't categories them with labels like dogs and cats but but but it can categories them based on their similarity's and differences like dogs have long tongue cats have small, dogs are longer cats are shorter and you may make many more differences but how machines do that we'll get back to its technical details in our next articles

it's interesting to know how supervise and unsupervised learning are completely opposite brothers.
OK let's not waste any more time and explore the roots of machine learnings second brother that is unsupervised learning.

now here in unsupervised learning we again have two categories:


  1.  clustering:

    clustering in unsupervised learning
    clustering means making different groups as we know we can't classify objects in unsupervised learning but to do so we can make clusters(groups) of the same feature objects.                                                                                                                                                                                  
  2. Association: in association the machine tries to relate two or more things based on some rules, such as people that buy X also tend to buy Y live example is YouTube for example when you watch the funny video it recommends you other funny videos.



so far we have covered the two major topics of machine learning now its time to cover the two remaining one that are-


Semi-supervised learning


 when a large amount of data is given in which some data is labeled and some data is not labeled then it is called semi-supervised learning so we can say it is the half half version of supervised and unsupervised learning.


example: suppose you were given a basket of fruits some have labels like apple,banana etc but some are unlabeled  so semi-supervised learning basically deals with such type of data.


Finally, we have our last topic lets talk about it :


Reinforcement learning


reinforcement learning is the real challenge in machine learning here the machine deal with the dynamic environment that is in the game of chess machines needs to take decision based on opponents moves or machine needs to play a shooting game like pubg on its on without human help so this is called reinforcement learning in this we try to implement our all understanding of machine learning.

don't worry we'll end this course with implementation of all our learning.


BOOKS FOR MACHINE LEARNING:


these are the books which I personally prefer hope you like the way of teaching too...

  • A Guide To Data science

  • Introduction To Machine Learning


Youtube Channel:

need the support of you guys - link to youtube


That's all for today hope you're liking my efforts keep enjoying and keep learning 

😃😃😃













Thursday, July 18, 2019

how to learn machine learning

Lesson-1

How to learn machine learning


how to learn machine learning introduction definitionWelcome to my blog I have done masters in computer science when I first started my ML journey I didn't get any good and easy step by step guide to machine learning so I have gone through a lot of machine learning courses.
because I knew that how much pain it is to find a good article which is simple and easy to understand for absolute beginners that's why I created this series of article for absolute beginners and for those who have advanced in ML but haven't got a full understanding of some machine learning concepts for them these articles are appropriate.

so when I first started my ML journey I didn't quite anticipate that how widespread the tool would become, and how much demand there would be for engineers who are skilled at using them so I am writing the series of articles to set you along the path to becoming a skilled practitioner of the art what you learn here will allow you as a software engineer to do three things better..........


1. First, it gives you a tool to reduce the time you spend on programming
suppose, I wanted to write a program to correct spelling errors, I could make my way through lots of examples and rules of thumb, 'I' before 'E' except after 'C', and after weeks of hard work come up with a reasonable program or I could use an "off-the-shelf" machine learning tool, feed it some examples, and get a more reliable program in a small fraction of time.                                                                                                                                           

2. Second, it will allow you to customize your products
making them better for specific groups of people suppose I produced my English spelling corrector by writing the code by hand, and it was so successful that I wanted to have versions in the 100 most popular languages I have to start almost from scratch for each language and it would take years of effort. but if I build it by using machine learning, then moving to another language to a first approximation means just collecting data in that language and feeding it into the exact same machine learning model.                                                                                                                                                 

3. Third machine learning lets you solve problems that you as a programmer, have no idea how to do by hand
As a human being I can recognize my friend's faces and understand their speech but I do this all subconsciously so if you asked to write down a program to do it I did be completely baffled but these are tasks that machine algorithms do very well I don't need to tell the algorithm what to do, I only need to show the algorithm lots of examples, and from that, the task can be solved.


Conclusion:

machine-learning changes the way you think about a problem software engineers are trained to think logically and mathematically we use assertions to prove properties of our program are correct. 
with machine learning, the focus shifts from a mathematical science to a natural science we are making observations about an uncertain world running an experiment and using statistics, not logic to analyze the results of the experiment. the ability to think like a scientist will expand your horizons and open up new areas that couldn't explorer without it so enjoys the upcoming articles and happy learning 😊.





              Q & A              

Q. Should we learn machine learning with python here?
ans. yes but, first we clear your basics.

Q. Is this a good machine learning tutorial?
ans. absolutely no doubt in that but if you find something difficult to understand please let us know in comments and do subscribe to our newsletter to get regular updates.

Q. Is machine learning projects also included in this course or these series of free articles?
ans. yup, I am trying very hard to write articles so that I can give you an easy explanation of projects and there source code.

Q. how to learn machine learning Reddit?
ans. the correct answer just searches " machine learning introduction " in Reddit when you didn't understand what the hell is going on in the articles come back to us and read our articles you eventually realized that we have taught every concept in a very easy manner.

Q. Are there any prerequisites for machine learning?
ans. umm yes...
                          1. learn python
                          2. learn high school maths
                          3. learn linear algebra
                          4. learn calculus
                          5. blah.. blah.. blah.....

get scared haha don,t worry I'll teach you everything just stick with these series of articles.




how to learn machine learning introduction definition








Everything Need To Know About BATTLEGROUNDS MOBILE INDIA

 BATTLEGROUNDS MOBILE INDIA  Finally, Krafton unveiled India’s beloved battle-royale game PUBG Mobile, but with a new name – Battlegrounds M...