DEV Community

anojaa gnanes
anojaa gnanes

Posted on

Machine Learning Algorithms

Part 1: Logistic Regression

Welcome to Article “Machine Learning Algorithms”. I write continuous article about Machine Learning Algorithms.I hope this article will help to who willing to learn machine learning .

First we discuss about what is Regression?” Regression is the predictive modelling Technique” the Regression will estimate the relationship between a dependent variable and an independent variable.

So what is Logistic Regression and why use that? In this Logistic Regression the Results/outcome should be generated in Binary format it is used to predict the outcome of a categorical/discrete variable.outcome should be like in this format. zero or one(0/1),true or false.

Logistic Regression We have the categorical(discrete) variable, so predict value in discrete in nature. for an example tomorrow going to snow or tomorrow not going to snow. Its solved basically classification problems, the Logistic Regression graph called sigmoid curve.

Now we can see the Logistic Regression use-cases in our real life. the first example is Weather prediction ,for an example In the whether prediction we predict ,Today which is going to rain or not going to rain. the result provide yes or no value.

now we moving to classification problem,python help to multi classification problem.if we taken the vertebrates animals, here we can classifying its a “horse or not / bear or not bear” like that.its called as a class classification.

there have few steps to implement to any machine learning algorithms ,I implement this algorithm with below steps.

1.Collecting data =The First step is collecting the data and import the libraries.

2.Analyzing data =The Second step is Analyzing data,here we creating the plot for check the Relationship between the variables.

3.Data wrangling= The Third step is wrangling the data , we have the large number of data sets so we need to cleaning the unnecessary data /null value data from our data set.so we used this code.

4.Train/Test=The Fourth step is Build the model on the Train data and predict the output the test data.here we use the Logistic Regression for the train the model

5.Accuracy check =The final step is Accuracy checking ,calculate the Accuracy to the our Result

Top comments (4)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
anojaa16 profile image
anojaa gnanes

thank you for your suggestion ,i consider this mistake and i wrote proper one next time

Collapse
 
Sloan, the sloth mascot
Comment deleted
 
anojaa16 profile image
anojaa gnanes

okay ,thank you