All Projects → hundredblocks → Ml Powered Applications

hundredblocks / Ml Powered Applications

Licence: mit
Companion repository for the book Building Machine Learning Powered Applications

Projects that are alternatives of or similar to Ml Powered Applications

Notes On Dirichlet Processes
🎲 Notes explaining Dirichlet Processes, HDPs, and Latent Dirichlet Allocation
Stars: ✭ 396 (-1.49%)
Mutual labels:  jupyter-notebook
Triplet recommendations keras
An example of doing MovieLens recommendations using triplet loss in Keras
Stars: ✭ 400 (-0.5%)
Mutual labels:  jupyter-notebook
Oreilly Learning Tensorflow
Stars: ✭ 404 (+0.5%)
Mutual labels:  jupyter-notebook
Bloom Contrib
Making carbon footprint data available to everyone.
Stars: ✭ 398 (-1%)
Mutual labels:  jupyter-notebook
Vcdb
VERIS Community Database
Stars: ✭ 398 (-1%)
Mutual labels:  jupyter-notebook
Tensorflow 101
《TensorFlow 快速入门与实战》和《TensorFlow 2 项目进阶实战》课程代码与课件
Stars: ✭ 402 (+0%)
Mutual labels:  jupyter-notebook
Pytorch classification
利用pytorch实现图像分类的一个完整的代码,训练,预测,TTA,模型融合,模型部署,cnn提取特征,svm或者随机森林等进行分类,模型蒸馏,一个完整的代码
Stars: ✭ 395 (-1.74%)
Mutual labels:  jupyter-notebook
Mit ocw linear algebra 18 06
IPython notebooks on Gilbert Strang's MIT course on linear algebra (18.06)
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook
Trainyourownyolo
Train a state-of-the-art yolov3 object detector from scratch!
Stars: ✭ 399 (-0.75%)
Mutual labels:  jupyter-notebook
Tensorflow learning notes
tensorflow学习笔记,来源于电子书:《Tensorflow实战Google深度学习框架》
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook
Pandas
Data & Code for my video on the Pandas library of Python
Stars: ✭ 397 (-1.24%)
Mutual labels:  jupyter-notebook
Face specific augm
Face Renderer to perform Domain (Face) Specific Data Augmentation
Stars: ✭ 398 (-1%)
Mutual labels:  jupyter-notebook
Deepsvg
[NeurIPS 2020] Official code for the paper "DeepSVG: A Hierarchical Generative Network for Vector Graphics Animation". Includes a PyTorch library for deep learning with SVG data.
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook
Icnet Tensorflow
TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
Stars: ✭ 396 (-1.49%)
Mutual labels:  jupyter-notebook
Coursera Stanford Ml Python
Coursera/Stanford Machine Learning course assignments in python
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook
Jupyter Renderers
Renderers and renderer extensions for JupyterLab
Stars: ✭ 395 (-1.74%)
Mutual labels:  jupyter-notebook
Anlp19
Course repo for Applied Natural Language Processing (Spring 2019)
Stars: ✭ 402 (+0%)
Mutual labels:  jupyter-notebook
Skimage Tutorials
skimage-tutorials: a collection of tutorials for the scikit-image package.
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook
Joint Vae
Pytorch implementation of JointVAE, a framework for disentangling continuous and discrete factors of variation 🌟
Stars: ✭ 404 (+0.5%)
Mutual labels:  jupyter-notebook
Namedtensor
Named Tensor implementation for Torch
Stars: ✭ 403 (+0.25%)
Mutual labels:  jupyter-notebook

Building ML Powered Applications

Book cover

Welcome to the companion code repository for the O'Reilly book Building ML Powered Applications. The book is available on Amazon.

This repository consists of three parts:

  • A set of Jupyter notebooks in the notebook folder serve to illustrate concepts covered in the book.

  • A library in the ml_editor folder contains core functions for the book's case study example, a Machine Learning driven writing assistant.

  • A Flask app demonstrates a simple way to serve results to users

  • The images/bmlpa_figures folder contains reproductions of a few figures which were hard to read in the first print version.

Credit and thanks go to Bruno Guisard who conducted a thorough review of the code in this repository.

Setup instructions

Python environment

This repository has been tested on Python 3.6 and 3.7. It aims to support any Python 3 version.

To setup, start by cloning the repository:

git clone https://github.com/hundredblocks/ml-powered-applications.git

Then, navigate to the repository and create a python virtual environment using virtualenv:

cd ml-powered-applications

virtualenv ml_editor

You can then activate it by running:

source ml_editor/bin/activate

Then, install project requirements by using:

pip install -r requirements.txt

The library uses a few models from spacy. To download the small and large English model (required to run the app and the notebooks), run these commands from a terminal with your virtualenv activated:

python -m spacy download en_core_web_sm

python -m spacy download en_core_web_lg

Finally, the notebooks and library leverage the nltk package. The package comes with a set of resources that need to be individually downloaded. To do so, open a Python session in an activated virtual environment, import nltk, and download the required resource.

Here is an example of how to do this for the punkt package from an active virtual environment with nltk installed:

python

import nltk

nltk.download('punkt')

Notebook examples

The notebook folder contains usage examples for concepts covered in the book. Most of the examples only use one of the subfolders in archive (the one that contains data for writers.stackexchange.com).

I've included a processed version of the data as a .csv for convenience.

If you wanted to generate this data yourself, or generate it for another subfolder, you should:

  • Download a subfolder from the stackoverflow archives

  • Run parse_xml_to_csv to convert it to a DataFrame

  • Run generate_model_text_features to generate a DataFrames with precomputed features

The notebooks belong to a few categories of concepts, described below.

Data Exploration and Transformation

Initial Model Training and Performance Analysis

Improving the Model

Model Comparison

Generating Suggestions from Models

Pretrained models

You can train and save models using the notebooks in the notebook folder. For convenience, I've included three trained models and two vectorizers, serialized in the models folder. These models are loaded by notebooks demonstrating methods to compare model results, as well as in the flask app.

Running the prototype Flask app

To run the app, simply navigate to the root of the repository and run:

FLASK_APP=app.py flask run

The above command should spin up a local web-app you can access at http://127.0.0.1:5000/

Troubleshooting

If you have any questions or encounter any roadblocks, please feel free to open an issue or email me at [email protected].

Project structure inspired by the great Cookiecutter Data Science.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].