In this video, we're going to see how to run a logistic regression and an S-V-M with scikit-learn. The LogisticRegression class in scikit-learn is used exactly like the other models you've seen in the prerequisite course. First, we import LogisticRegression from scikit-learn. You'll notice that we import it from linear_model, because logistic regression is a linear classifier. We'll come back to this later. Next, we instantiate a classifier object. We fit the classifier on our training set. Then we can predict, compute the score, etc. Let's try this on a sample dataset, namely the dataset
The rest of this lesson is reserved for subscribers Create your free account to try the sample exercises, then upgrade to full access whenever you like.