Category «Machine Learning»

General Mathematics, Linear algebra, and Calculus.

In Machine Learning we use few mathematical terms that are important and frequently used, with this article I tried to list down those important keywords. When we walk on ML, we need a clear visualization of these terms so that we can understand what we want to achieve by using the algorithms. Machine learning is …

Multi-class classification

The multi-class classification is to assign an instance to one of the sets of classes. scikit-learn uses a strategy called one-vs.-all, or one-vs.-the-rest, to support multi-class classification. The goal of multi-class classification is to assign an instance to one of the sets of classes We can download the data from https://www.kaggle.com/c/sentiment-analysis-on-movie-reviews/data, the use following steps: Import the …

Logistic Regression

A Classical way, Logistic Regression is the younger son of Mr.ML, he is very efficient in predicting any problem associated with binary values. Whenever any person comes to Mr.ML and having problems like will his loan approves or not?, is it possible that he gets profit this year or not?, usually he asks his son Logistic …

How to calculate score in Machine Learning

In order to calculate score of different types of Algorithm we use following types of methods, few methods from SkLearn library are mentioned below.   Scoring Function Comment Classification ‘accuracy’ metrics.accuracy_score ‘average_precision’ metrics.average_precision_score ‘f1’ metrics.f1_score for binary targets ‘f1_micro’ metrics.f1_score micro-averaged ‘f1_macro’ metrics.f1_score macro-averaged ‘f1_weighted’ metrics.f1_score weighted average ‘f1_samples’ metrics.f1_score by multilabel sample ‘neg_log_loss’ metrics.log_loss …

Classes in Python

A class is a wrapping of data member and  member function inside a single unit. Lets take an example of a Interest class in which we have members, principal, rate and time. We have member function as SimpleIntrest. class Interest(): rate=3.5 def __init__(self,p,t): #Data Members self.principal=p self.rate=self.rate self.time=t self.si=self.principal*self.rate*self.time/100 pass #Memeber Function def SimpleIntrest(self): print(self.si) …

Simple Linear Regression

In a Classical way, Linear Regression is the son of Mr.ML, he is very efficient in predicting any problem associated with continuous variables. Whenever any person comes to Mr.ML and having problems like how much profit a person gets?, how many runs a cricketer may score?, usually he asks his son Linear to answer those question. …