HomeCoursesLinear classifiers in Python

Applying logistic regression and SVMs

Chapter 2 · Putting logistic regression and SVMs into practice · lesson 6 of 46
Reserved for subscribers — here is the beginning
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.

Create your free account

No credit card required, in thirty seconds.
Continue with Google
or
Sign up with an e-mail
Already registered? Log in
By continuing, you agree to the terms of use and the privacy policy. Your data is hosted in the European Union.

Full access DATAGOZ

19 €/ month — or 190 € / year
  • All published courses and career paths
  • Exercises and quizzes with automatic grading
  • Practice, exam and certificate of completion
  • No commitment, cancel online
See the plans
This lesson is part of the course

Linear Classifiers in Python

short_training6 chapters · 46 lessons
  • The training platformsubscribers
  • Review of the fundamentals of scikit-learnsubscribers
  • Discover KNN classificationsubscribers
  • Compare model performancesubscribers
  • Understand overfittingsubscribers
  • Applying logistic regression and SVMsyou are here
  • Use LogisticRegression and SVCsubscribers
  • Perform sentiment analysis on movie reviewssubscribers
  • Understand linear classifierssubscribers
  • Identify linear decision boundariessubscribers
  • Visualize decision boundariessubscribers
  • Study the coefficients of linear classifierssubscribers
  • Understand how models make their predictionssubscribers
  • Modify a model's coefficientssubscribers
  • Discover the concept of loss functionsubscribers
  • Understand the 0-1 loss functionsubscribers
  • Learn how to minimize a loss functionsubscribers
  • Visualize the different loss functionssubscribers
  • Explore loss functions in classificationsubscribers
  • Compare the logistic and hinge loss functionssubscribers
  • Implement a logistic regression modelsubscribers
  • Understanding regularization in logistic regressionsubscribers
  • Implement a regularized logistic regressionsubscribers
  • Using logistic regression to select variablessubscribers
  • Identifying the most positive and most negative wordssubscribers
  • Understanding probabilities in logistic regressionsubscribers
  • Extracting class membership probabilitiessubscribers
  • Studying the effect of regularization on probabilitiessubscribers
  • Visualizing simple and complex classification examplessubscribers
  • Discovering multiclass logistic regressionsubscribers
  • Determining the number of coefficientssubscribers
  • Fit a multiclass logistic regression modelsubscribers
  • Visualize the results of multiclass logistic regressionsubscribers
  • Apply the one-vs-all SVM strategysubscribers
  • Understand support vectorssubscribers
  • Identify support vectorssubscribers
  • Study the effect of removing certain observationssubscribers
  • Discover kernel SVMssubscribers
  • Get started with GridSearchCVsubscribers
  • Optimize the gamma and C parameters simultaneously with GridSearchCVsubscribers
  • Compare logistic regression, SVMs and other methodssubscribers
  • Identify the advantages of SVMssubscribers
  • Identify the advantages of logistic regressionsubscribers
  • Using the SGDClassifier modelsubscribers
  • In conclusionsubscribers
  • Course conclusionsubscribers
Next lesson

Using LogisticRegression and SVC

View the programme Create an account to continue