Category «Machine Learning»

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. …

Support Vector Machine-SVM

A Support Vector Machine is a supervised algorithm that can classify cases by finding a separator. SVM works by first mapping data to a high dimensional feature space so that data points can be categorized, even when the data are not otherwise linearly separable. Then, a separator is estimated for the data. Lets X is …

Parametric vs Non Parametric Algorithm

It depends on whether the number of parameters in the model grows as the number of examples in the dataset grows. Here, parameter means the entity that measures the model like median. Parametric :Fixed number of parameters regardless of the number of examples. Liner Regression Logistic Regression Linear Discriminant Analysis Perceptron Naive Bayes Non-Parametric: Not …