Microsoft Azure Ml Cheat Sheet



All the options for Enterprise integration

  1. Microsoft Machine Learning Cheat Sheet
  2. Microsoft Azure Ml Cheat Sheet 2018
  3. Microsoft Azure Cheat Sheet Pdf
  4. Microsoft Azure Ml Cheat Sheet Free
  • Conda

Microsoft ML

Microsoft Azure Cheatsheet. Download the new cheat sheet here: Machine Learning Algorithm Cheat Sheet (11x17 in.) Gaurav Shahi. a year ago. Options. Microsoft Azure Machine Learning: Algorithm Cheat Sheet. Microsoft Azure’s cheet sheet is the simplest cheet sheet by far. Even though it is simple, Microsoft was still able to pack a ton of information into it. Microsoft also made their algorithm sheet available to download.

Microsoft has a “Cheat Sheet” to help you select a Machine Learning alogorithm fromamong the various initiatives:

Category Algorithm MS
Statistical Functions Descriptive Statistics (Summarize Data) Y
Hypothesis Testing Y
Compute T-Test Linear Correlation Y
Evaluate Probability Function Evaluation Y
Recommendation (collaborative filtering) Train Matchbox Recommender Y
Score Matchbox Recommender Y
Evaluate Recommender Y
Regression Bayesian Linear Regression Y
Boosted Decision Tree Y
Tree Decision Forest Y
Fast Forest Quantile Regression Y
Linear Regression Y
Neural Network Regression Y
Ordinal Regression Y
Poisson Regression Y
Clustering K-means Clustering Y
Anomaly Detection One-class Support Vector Machine Y
Principal Component Analysis-based Anomaly Detection Y
Time Series Anomaly Detection Y
Two-class
Classification
Averaged Perceptron Y
Bayes Point Machine Y
Boosted Decision Tree Y
Decision Forest Y
Decision Jungle Y
Logistic Regression Y
Neural Network Y
Support Vector Machine Y
Multi-class Classification Tune Model Hyperparameters Y
Decision Forest Y
Decision Jungle Y
Logistic Regression Y
Neural Network Y
One-vs-all Y
Text Analytics Feature Hashing Y
Named Entity Recognition Vowpal Wabbit (v8) Y
Computer Vision OpenCV Library Y
Voice Text to Speech Cortana
Translation Language Translation Cortana

A-Z List of Machine Learning Studio Modulesfrom Microsoft Azure

https://bit.ly/a4r-mlbookAzure Machine Learning: Microsoft Azure Essentials

https://www.youtube.com/watch?v=eUce2cB844s&t=19m52sHands-On with Azure Machine Learning26 Sep 2016predicts car prices

Conversions

Some utilities may involve conventional lookups of data:

Algorithmia.com provide API interfaces to algorithms offered by its partners.

  • https://algorithmia.com/algorithms/alixaxel/CoordinatesToTimezone

  • https://algorithmia.com/algorithms/Geo/ZipData

  • https://algorithmia.com/algorithms/Geo/ZipToState

  • https://algorithmia.com/algorithms/Geo/LatLongDistance

  • https://algorithmia.com/algorithms/Geo/LatLongToUTM

  • https://algorithmia.com/algorithms/util/ip2hostname

  • https://algorithmia.com/algorithms/opencv/ChangeImageFormat (from jpg to png)

Translation

  • Google Translate API has been working on websites for years.

Image Recognition / Computer Vision

Microsoft Machine Learning Cheat Sheet

  • https://algorithmia.com/algorithms/z/ColorPalettefromImage

  • https://algorithmia.com/algorithms/opencv/FaceDetection then https://algorithmia.com/algorithms/opencv/CensorFace

  • https://algorithmia.com/algorithms/ocr/RecognizeCharacters OCR

Some of these make use of OpenCV (CV = Computer Vision).

Handwriting recognition book and GitHub for Neural Networks and Deep Learning by Michael Nielsen

http://www.deeplearningbook.org by Ian Goodfellow, Yoshua Bengio, and Aaron Courville.

Voice Recognition

  • Google Cloud Speech API, which powers Google’s own voice search and voice-enabled apps.

Speech to Text

Sentiment Analysis

Analyze text for positive or negative sentiment, based on a training database of potential word meanings:

  • https://algorithmia.com/algorithms/nlp/SentimentAnalysis

  • IBM

Document (article) Search

TF-IDF = Term Frequency - Inverse Document Frequency emphasizes important words (called a vector) which appear rarely in the corpus searched (rare globally). which appear frequently in document (common locally) Term frequency is measured by word count (how many occurances of each word).

The IDF to downweight words is the log of #docs divided by 1 + #docs using given word.

Cosine similarity normalizes vectors so small angle thetas identify similarity.

Normalizing makes the comparison invariant to the number of words. The common compromise is to cap maximum word count.

Microsoft Azure Machine Learning

Microsoft Azure Ml Cheat Sheet

https://azure.microsoft.com/en-us/services/machine-learningoffers free plans

  • Guest Workspace for 8 hours on https://studio.azureml.net/Home/ViewWorkspaceCached/…

  • Registered free workspaces with 10 GB storage can scale resources to increase experiment execution performance.

All their plans offer:

  • Stock sample datasets
  • R and Python script support
  • Full range of ML alogorithms
  • Predictive web services

Follow this machine learning tutorialto use Azure Machine Learning Studio tocreate a linear regression model that predicts the price of an automobile based on different variables such as make and technical specifications. Then iterate on a simple predictive analytics experiment after

Regression works on numbers.
Classification works on strings.

  1. Enter Microsoft’s Learning Studio:

    As per this video:

    https://studio.azureml.net/?selectAccess=true&o=2

  2. Look at examples in the Cortana Intelligence Gallery

  3. Take the introductory tutorial:

  4. Create a model

  5. Prepare Data:

    As per this videousing

    • Clean Missing Data - Clip Outliers
    • Edit Metadata
    • Feature Selection
    • Filter
    • Learning with Counts
    • Normalize Data
    • Partition and Sample
    • Principal Component Analysis
    • Quantize Data
    • SQLite Transformation
    • Synthetic Minority Oversampling Technique
  6. Train the model

    • Cross Validation
    • Retraining
    • Parameter Sweep
  7. Score and test the model

  8. Make predictions with Elastic APIs

    • Request-Response Service (RRS) Predictive Experiment - Batch Execution Service (BES)
    • Retraining API

https://azure.microsoft.com/en-us/documentation/articles/machine-learning-studio-overview-diagram/

Footnotes

Python 3.6 has formatted strings

Conda

Conda is similar to virtualenv and pyenv, other popular environment managers.

https://virtualenv.pypa.io/en/stable/

https://github.com/yyuu/pyenv

https://www.continuum.io/downloads

  1. Can’t find it? Look among all users and operating systems supported

    On a Mac https://anaconda.org/tlatorre/pygameis not recognized because it’s only for Linux.

    On Stack Overflow a user recommends on that supportsWindows 32 and 64, MacOS, and Linux:

    Alternatively:

  2. Copy a user/package to show more info:

  3. List the packages installed, with its version number andwhat version of Python:

Conda Environments

  1. Create new environment for Python, specifying packages needed:

    conda create -n my_env python=3 numpy pandas

  2. Enter an environment on Mac:

    source activate my_env

    On Windows:

    activate my_env

    When you’re in the environment, the environment’s name appears in the prompt:

    (my_env) ~ $.

  3. Leave the environment (like exit):

    source deactivate

    On Windows, it’s just deactivate.

  4. Get back in again.

  5. Create an enviornment file by piping the output from an export:

    conda env export > some_env.yaml

    When sharing your code on GitHub, it’s good practice to make an environment file and include it in the repository. This will make it easier for people to install all the dependencies for your code. I also usually include a pip requirements.txt file using pip freeze (learn more here) for people not using conda.

  6. Load an environment metadata file:

    conda env create -f some_env.yaml

  7. List environments created on your machine:

    conda env list

  8. Remove an environment:

    conda env remove -n some_env

  9. Add a package

    OpenCV

    anaconda show menpo/opencv3

    conda install –channel https://conda.anaconda.org/menpo opencv3

    FFMPEG codec

  10. Test within Python »> :

    The response should be:

    Customization

  11. Install readline to do autocompletion in Jupyter notebooks by hitting tab

    conda/pip install readline

    Readline comes with anaconda

Read:

  • https://conda.io/docs/using/index.html

  • https://jakevdp.github.io/blog/2016/08/25/conda-myths-and-misconceptions/

  • http://cola.github.io

More

http://martin.zinkevich.org/rules_of_ml/rules_of_ml.pdf

http://www.h2o.ai/h2o/ platform is built using Java working on H2O’s rapid in-memory distributed parallel processing. Its models can be visually inspected during training, which is unique to H2O. , so they can immediately spot a job that should be stopped and more quickly iterate to find the optimal approach.

http://www.discoversdk.com/blog/machine-learning-with-python

Videos

Machine Learning Recipes (using Python) - 17 videos by
Google Developers with Josh Gordon in New York at @random_forests

  1. Hello World [6:52]</a> apples and oranges

  2. Visualizing a Decision Tree - Apr 13, 2016 [6:31]</a>

    50 examples of each of 4 types of irises, with Sepal and Petal length and width, at https://en.wikipedia.org/wiki/Iris_flower_data_set

    [4:18] https://graphviz.org

    graph.write_pdf(“iris.pdf”)

    open -a preview iris.pdf

    sudo python3 -m pip install pydot

  3. What Makes a Good Feature?</a>

  4. Let’s Write a Pipeline</a> Download betaflight mac.

  5. Writing Our First Classifier [8:43]</a>

  6. Train an Image Classifier with TensorFlow for Poets</a>

  7. Classifying Handwritten Digits with TF.Learn</a>

https://hub.docker.com/r/jbgordon/recipes/ is a Docker image to help folks having trouble with Pydot or Graphviz. It has all the dependencies setup and installation instructions.

AI

awesome-machine-learningprovides many links to resources, so they will not be repeated here.

More

https://www.sas.com/en_us/insights/analytics/machine-learning.html

Please enable JavaScript to view the comments powered by Disqus.

In this post we explain how Azure ML builds the containers used to run your code.

Dockerfile#

Each job in Azure ML runs with an associated Environment. In practice, each environmentcorresponds to a Docker image.

There are numerous ways to define an environment - from specifying a set of required Python packagesthrough to directly providing a custom Docker image. In each case the contents of the associateddockerfile are available directly from the environment object.

For more background: Environment

Example#

Microsoft azure cheat sheet pdf

Suppose you create an environment - in this example we will work with Conda:

MicrosoftCheat
channels:
- pytorch
- python=3.7
- torchvision

Unity minecraft. We can create and register this as an Environment in our workspace ws as follows:

env = Environment.from_conda_specification('pytorch','env.yml')

In order to consume this environment in a remote run, Azure ML builds a docker imagethat creates the corresponding python environment.

The dockerfile used to build this image is available directly from the environment object.

print(details['ingredients']['dockerfile'])

Let's take a look:

FROM mcr.microsoft.com/azureml/intelmpi2018.3-ubuntu16.04:20200821.v1@sha256:8cee6f674276dddb23068d2710da7f7f95b119412cc482675ac79ba45a4acf99
RUN mkdir -p $HOME/.cache
COPY azureml-environment-setup/99brokenproxy /etc/apt/apt.conf.d/
RUN if dpkg --compare-versions `conda --version | grep -oE '[^ ]+$'` lt 4.4.11; then conda install conda4.4.11; fi
COPY azureml-environment-setup/mutated_conda_dependencies.yml azureml-environment-setup/mutated_conda_dependencies.yml
RUN ldconfig /usr/local/cuda/lib64/stubs && conda env create -p /azureml-envs/azureml_7459a71437df47401c6a369f49fbbdb6 -
f azureml-environment-setup/mutated_conda_dependencies.yml && rm -rf '$HOME/.cache/pip' && conda clean -aqy && CONDA_ROO
T_DIR=$(conda info --root) && rm -rf '$CONDA_ROOT_DIR/pkgs' && find '$CONDA_ROOT_DIR' -type d -name __pycache__ -exec rm

Microsoft Azure Ml Cheat Sheet 2018

# AzureML Conda environment name: azureml_7459a71437df47401c6a369f49fbbdb6
Machine
ENV PATH /azureml-envs/azureml_7459a71437df47401c6a369f49fbbdb6/bin:$PATH

Microsoft Azure Cheat Sheet Pdf

ENV AZUREML_CONDA_ENVIRONMENT_PATH /azureml-envs/azureml_7459a71437df47401c6a369f49fbbdb6
ENV LD_LIBRARY_PATH /azureml-envs/azureml_7459a71437df47401c6a369f49fbbdb6/lib:$LD_LIBRARY_PATH
COPY azureml-environment-setup/spark_cache.py azureml-environment-setup/log4j.properties /azureml-environment-setup/
RUN if [ $SPARK_HOME ]; then /bin/bash -c '$SPARK_HOME/bin/spark-submit /azureml-environment-setup/spark_cache.py'; fi
CMD ['bash']

Notice:

Microsoft Azure Ml Cheat Sheet Free

  • The base image here is a standard image maintained by Azure ML. Dockerfiles for all base images are available ongithub: https://github.com/Azure/AzureML-Containers
  • The dockerfile references mutated_conda_dependencies.yml to build the Python environment via Conda.

Get the contents of mutated_conda_dependencies.yml from the environment:

print(env.python.conda_dependencies.serialize_to_string())

Which looks like

- defaults
dependencies:
- pytorch
name: azureml_7459a71437df47401c6a369f49fbbdb6