Advanced Machine Learning

This page’s URL:

Wednesday, April 24, 2019



If you’re using Enthought EDM, you can download the bundle for you platform below, and import it as the “ml-tutorial” environment with:

$ edm envs import ml-tutorial -f PATH_TO_BUNDLE

If you’re using conda, you can create the “ml-tutorial” environment with:

conda create -n ml-tutorial python=3 "beautifulsoup4" "html5lib" "jupyter" "lxml" "matplotlib" "nltk" "numpy" "openpyxl" "pandas>=0.23.0" "pandas<0.24.0" "pandas-datareader" "pip" "pyqt" "pytables" "requests" "scikit-learn>=0.20.0" "scikit-learn<0.21.0" "scikit-image>0.14.0" "scipy" "seaborn" "setuptools" "spacy"  "sqlalchemy" "statsmodels" "xlrd"

Then activate the environment and install the spacy English model with:

python -m spacy download en

Example data

For orthographic contents:

import pandas as pd
s = pd.Series([
    "#TrainerTip : Did you know? #Jupyter notebooks support equations written with #LaTeX ! #TeX",
    "@ApacheArrow and the '10 Things I Hate About pandas' … #pydata #longreads",
    "I hate Matlab: How an IDE, a language, and a mentality harm "

For word embeddings

sentences = [
    "Next you eat the banana! Thus disarming him!",
    "You've got two empty halves of coconuts and you're banging them together!",
    "Remarkable bird, the Norwegian Blue. Beautiful plumage.",