Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
fastText Quick Start Guide

You're reading from   fastText Quick Start Guide Get started with Facebook's library for text representation and classification

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781789130997
Length 194 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Joydeep Bhattacharjee Joydeep Bhattacharjee
Author Profile Icon Joydeep Bhattacharjee
Joydeep Bhattacharjee
Arrow right icon
View More author details
Toc

Scikit-learn and fastText

In this section, we will be talking about how to integrate fastText into your statistical models. The most common and popular library for statistical machine learning is scikit-learn, so we will focus on that.

scikit-learn is one of the most popular machine learning tools and the reason is that the API is very simple and uniform. The flow is like this:

  1. You basically convert your data into matrix format.
  2. Then, you create an instance of the predictor class.
  3. Using the instance, you run the fit method on the data.
  4. Once the model is created, you can run predict on it.

This means that you can create a custom classifier by defining the fit and predict methods.

Custom classifiers for fastText

Since we...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image