microsoftml package

The microsoftml module is a collection of Python functions used in machine learning solutions. It includes functions for training and transformations, scoring, text and image analysis, and feature extraction for deriving values from existing data.

Package details
Version: 1.5.0
Runs on: Machine Learning Server 9.2.1
SQL Server 2017 Machine Learning Services
SQL Server 2017 Machine Learning Server (Standalone)(https://docs.microsoft.com/sql/advanced-analytics/r/r-server-standalone#whats-new-in-microsoft-machine-learning-server)
Built on: Anaconda 4.2 distribution of Python 3.5 (included when you add Python support during installation).

How to use microsoftml

The microsoftml module is installed as part of Microsoft Machine Learning Server or SQL Server Machine Learning when you add Python to your installation. You get the full collection of proprietary packages plus a Python distribution with its modules and interpreters. You can use any Python IDE to write Python script calling functions in microsoftml, but the script must run on a computer having either Microsoft Machine Learning Server or SQL Server Machine Learning Server with Python.

Microsoftml and revoscalepy are tightly coupled; data sources used in microsoftml are defined as revoscalepy objects. Compute context limitations in revoscalepy transfer to microsoftml. Namely, all functionality is available for local operations, but switching to a remote compute context requires RxSpark or RxInSQLServer.

Functions by category

This section lists the functions by category to give you an idea of how each one is used. You can also use the table of contents to find functions in alphabetical order.

1-Training functions

Function Description
microsoftml.rx_ensemble Train an ensemble of models
microsoftml.rx_fast_forest Random Forest
microsoftml.rx_fast_linear Linear Model with Stochastic Dual Coordinate Ascent
microsoftml.rx_fast_trees Boosted Trees
microsoftml.rx_logistic_regression Logistic Regression
microsoftml.rx_neural_network Neural Network
microsoftml.rx_oneclass_svm Anomaly Detection

2-Transform functions

Categorical variable handling

Function Description
microsoftml.categorical Converts a text column into categories
microsoftml.categorical_hash Hashes and converts a text column into categories

Schema manipulation

Function Description
microsoftml.concat Concatenates multiple columns into a single vector
microsoftml.drop_columns Drops columns from a dataset
microsoftml.select_columns Retains columns of a dataset

Variable selection

Function Description
microsoftml.count_select Feature selection based on counts
microsoftml.mutualinformation_select Feature selection based on mutual information

Text analytics

Function Description
microsoftml.featurize_text Converts text columns into numerical features
microsoftml.get_sentiment Sentiment analysis

Image analytics

Function Description
microsoftml.load_image Loads an image
microsoftml.resize_image Resizes an Image
microsoftml.extract_pixels Extracts pixels form an image
microsoftml.featurize_image Converts an image into features

Scoring functions

Function Description
microsoftml.rx_predict Scores using a Microsoft machine learning model

Featurization functions

Function Description
microsoftml.rx_featurize Data transformation for data sources

Next steps

For SQL Server, add both Python modules to your computer by running setup:

Follow this SQL Server tutorial for hands on experience:

See also

Machine Learning Server
SQL Server Machine Learning Services with Python
SQL Server Machine Learning Server (Standalone)