Skip to main content

Posts

NEW TREND OF DATA SCIENCE: REINFORCEMENT LEARNING

Recent posts

What do DATA SCIENTIST do?

In this blog, you will discover what are the things that data scientists do? Data science is not about making complicated models. It's not about making awesome visualizations. It's not about writing code. Data science is about using data to create as much impact as possible for your company. Now, the impact can be in the form of multiple things. It could be: In the form of insights. In the form of data products. In the form of product recommendations for a company. Now to do those things, then you need tools like making complicated models or data visualizations or writing code. But essentially as a data scientist, your job is to solve real company problems using data, and what kind of tools you use we don't care. Now there's a lot of misconception about data science, especially on the Web and I think the reason for this is because there's a huge misalignment between what's popular to talk about and what's needed in the industry. So because of that, I want to...

Implementation KNN- Classifier in Python

  As we previously examine the  KNN  that how it works and how to select the K for better outcomes and no overfitting. In this article, we will be going to code the python version for KNN and we will find the most immeasurable value of K to use for better outcomes. Find the below code with explanation: Import the necessary libraries which we will need for the future. Now load the dataset from the local and find how rows look in it. To download the dataset please refer to the following  link . Now select all the features and the target_class from the set and divide the set into test and train by 33% and 67%. Now for a range values of K fit on the training dataset and then test on the test dataset and find the accuracy and then store it into some array. Now plot the K-values with their corresponding accuracy and see which value is best. Now we have our model and we can predict any given unknown value with more accuracy because now we know the best value of k. Thanks f ...

KNN(K-Nearest Neighbour) algorithm, maths behind it and how to find the best value for K

  KNN is a powerful classifier and a regressor. yes, you got it right we can do both regression or classification by this algorithm. For its implementation in python please visit this   link . What is KNN and how it works: Let’s head by setting some definitions and notations. We will take x to denote a feature and y to denote the target. KNN falls in the  supervised learning   algorithm s . This means that we have a dataset with labels training measurements (x,y) and would want to find the link between x and y. Our goal is to discover a function h:X→Y so that having an unknown observation x, h(x) can positively predict the identical output y. Working First, we will talk about the working of the KNN classification algorithm. In the classification problem, the K-nearest neighbor algorithm essentially said that for a given value of K algorithm will find the K nearest neighbor of unseen data point and then it will assign the class to unseen data point by having the class...

Logistic Regression, Maths behind it and where to use it

  Logistic Regression: Logistic regression is a classification algorithm used to determine the values for the discrete classes. Unlike the linear regression which usually outputs the continuous value, the logistic regression uses sigmoid function and it will output the probability which will then mapped to the two or more classes. There can be two types of logistic regression possible which are: Binary:  (having two classes) Multi-variable:  (having more than two) First of all, let us understand the binary logistic regression and then it will be too easy to grasp what is multi-variable logistic regression. Binary Logistic Regression: As notified that n a me binary, so we will trade with the two classes primarily, we will just determine the probabilities and based upon some rule we will determine which class it belongs to mostly we will do like if p(x) > 0.5 then 1st class else 0th class. So we will decide the class like this simply. For predicting the probability we wi...

Linear Regression, Maths behind it and Best Reason for using least squares

  Linear Regression Linear Regression is quite a way that will attempt to fit a line through observed variables (x,y). If we look into the graphs it will try to find the line which is more touching to the point (x^i,y^i) for all I in the dataset, y as a linear function of x and it will seem like As it will try to prophesy a line most possible it will do by the least-squares method which is going to decrease the squares of the distance from the line for all the points. Catholic rule of Least Squares As the met h od will try to find the line Y = MX+ b and for solving it by math just find the distance from the line by putting the point in the equation and all the distances and just minimize it by taking derivative and assigning it to the zero. The general equation looks like and to view it on the graph it will look like Why we use least squares One purpose is that the equations required in solving for the best-fit line are easy to solve. The only satisfying reason for using it will be...