ŷhat Core API

Turn Analytical Projects into Products

ŷhat supports most regression and classification algorithms in popular scientific projects like scikit-learn and Statsmodels. Here's how to deploy a production-ready text classifier using about 10 lines of code.


Prerequisties

To read about the classifier and download the code click here.

You can install Yhat using pip:

If you don't have pip installed check out one of these resources for how to install it:


Deployment Format

Here's our SMS classifier.


Five Steps to Deploy:

Here's what we'll do to deploy to ŷhat.

  1. Import the ŷhat library
  2. Create a subclass of yhat.Basemodel
  3. Define transform and predict functions. These tell ŷhat what to do when our API is called to make predictions. Our transform step is just the code we wrote to convert to tf-idf vector representation and our predict step is just the predict function from the MultinomialNB classifier we're using.
  4. Authenticate by passing your Username and APIKEY to yhat.Yhat
  5. Train your model and pass it to yh.upload to deploy it.

Following these steps...



That's it! Your model is now available as a RESTful API which can be used to make predictions from your other software systems. Check out our SMS Spam Predictor App using the Naive Bayes classifier deployed with the above code and read about it on our blog.

Conclusion

One of the perks of choosing Python over other scientific computing environments is its flexibility and versitility. Python is a powerful platform suitable for a variety of applications. Best of all, it's well known among both software developers and statisticians.

We're working hard to make ŷhat a natural extension of the Python environments familiar to both analysts and technologists in order to give teams the best medium in which to work effectively together. ŷhat empowers data science teams to turn isolated analytical work into predictive APIs which can be immediately consumed by other software systems.

Related:

Made in New York City • © 2013 Yhat, Inc. Back to Top