Skip to main content

Posts

Implementation of a machine learning model

Let's implement a machine learning model So, now we study many things about ml. Its time to use it and build a machine learning model. We are gonna train a model on  House Prices - Advanced Regression Techniques You can find it on kaggle by this link Implementation Use this link to access the kaggle notebook read it this will give you great understanding of how ml models created Click here to go notebook

The most powerful kernel trick of SVM

 The kernel trick is most important and powerful technique of SVM . Linear VS Non-Linear dataset linear vs non-linear figure Problem Statement Currently we have learn how to apply SVM algorithm at linear datasets, but what if we have non linear dataset. Solution of Problem Solution is kernel trick. Kernel Trick The Kernel trick is trick where we add  many SVMS  models by bagging,voting,stacking and boosting or we can use SVM class to implement it. Implementation To implement it follow code given below- from sklearn.svm import SVC svc=SVC() svc.fit(X_train,y_train) svc.score(X_test,y_test)

SVM Intuition

SVM Intuition SVM(Support Vector Machine) is knows as family of linear models but it is really good than linear models it can draw line also and work as well in non-linear dataset also NOTE-Linear models<SVM always this is not true remember The target of LinearSVM classifier is to maximize margin

Voting Regressor

 Voting Regressor In previous class we discuss about the voting classifier.Today we use voting with regression.Let's start todays class Model: 1. Linear Regression 2. Support vector machine 3. Random forest New point - X=0.987,y=? How our voting regressor predict value? Linear Regression says 15.7 SVM says 12.9 Random forest says 8 Voting Regressor take mean of all model outputs which is 31.2 It means new point X=0.987 and y=31.2