Guide for Linear Regression using Python – Part 2

Posted on 2 CommentsPosted in Machine Learning, Predictive Analysis

Guide for Linear Regression using Python – Part 2 This blog is the continuation of guide for linear regression using Python from this post. There must be no correlation among independent variables. Multicollinearity is the presence of correlation in independent variables. If variables are correlated, it becomes extremely difficult for the model to determine the […]

Predicting NBA winners with Decision Trees and Random Forests in Scikit-learn

Predicting NBA winners with Decision Trees and Random Forests in Scikit-learn

Posted on Leave a commentPosted in Machine Learning, Predictive Analysis, scikit-learn

In this blog, we will be predicting NBA winners with Decision Trees and Random Forests in Scikit-learn.The National Basketball Association (NBA) is the major men’s professional basketball league in North America and is widely considered to be the premier men’s professional basketball league in the world. It has 30 teams (29 in the United States and […]

Machine Learning Algorithms

10 groups of Machine Learning Algorithms

Posted on Leave a commentPosted in Data Analysis Resources, Machine Learning, Predictive Analysis

In this article, I grouped some of the popular machine learning algorithms either by learning or problem type. There is a brief description of how these algorithms work and their potential use case. Regression How it works: A regression uses the historical relationship between an independent and a dependent variable to predict the future values […]

Features selection for determining House Prices ?

Posted on Leave a commentPosted in Kaggle, Predictive Analysis, scikit-learn

Home values are influenced by many factors. Basically, there are two major aspects: The environmental information, including location, local economy, school district, air quality, etc. The characteristics information of the property, such as lot size, house size and age, the number of rooms, heating / AC systems, garage, and so on. When people consider buying […]

4 different ways to predict survival on Titanic - part 4

4 different ways to predict survival on Titanic – part 2

Posted on Leave a commentPosted in Data Analysis Resources, Kaggle, Predictive Analysis

continued from part 1 Classification KNeighborsClassifier In [16]: from sklearn.neighbors import KNeighborsClassifi alg_ngbh = KNeighborsClassifier(n_neighbors=3) scores = cross_validation.cross_val_score(alg_ngbh, train_data_scaled, train_data_munged[“Survived”], cv=cv, n_jobs=-1) print(“Accuracy (k-neighbors): {}/{}”.format(scores.mean(), scores.std())) Accuracy (k-neighbors): 0.7957351290684623/0.011110544261068086 SGDClassifier In [17]: from sklearn.linear_model.stochastic_gradient import SGDClassifier alg_sgd = SGDClassifier(random_state=1) scores = cross_validation.cross_val_score(alg_sgd, train_data_scaled, train_data_munged[“Survived”], cv=cv, n_jobs=-1) print(“Accuracy (sgd): {}/{}”.format(scores.mean(), scores.std())) Accuracy (sgd): 0.7239057239057239/0.015306601231185043 SVC In [18]: from sklearn.svm […]