January 2018
Beginner to intermediate
548 pages
12h 11m
English
In this recipe, we will introduce logistic regression, a basic classifier. We will apply these techniques on a Kaggle dataset where the goal is to predict survival on the Titanic based on real data (see http://www.kaggle.com/c/titanic).
Kaggle (http://www.kaggle.com/competitions) hosts machine learning competitions where anyone can download a dataset, train a model, and test the predictions on the website.
>>> import numpy as np
import pandas as pd
import sklearn
import sklearn.linear_model as lm
import sklearn.model_selection as ms
import matplotlib.pyplot as plt
%matplotlib inlineRead now
Unlock full access