Quickstart: An example of binary classification with the microsoftml Python package
Important
This content is being retired and may not be updated in the future. The support for Machine Learning Server will end on July 1, 2022. For more information, see What's happening to Machine Learning Server?
Applies to: Machine Learning Server 9.x
Learn how to use binary classification using the functions in the microsoftml package that ships with Machine Learning Server. Data scientists work locally in their preferred Python IDE and favorite version control tools to build scripts and models.
This example uses the well known breast cancer dataset. The dataset contains characteristics of cell nuclei and has a target label to indicate whether the tumor was benign (0) or malignant (1). The example builds a linear model with the rx_fast_linear function from the microsoftml package.
Time estimate
After you have completed the prerequisites, this task takes approximately 10 minutes to complete.
Prerequisites
Before you begin this QuickStart, have the following ready:
- An instance of Machine Learning Server installed with the Python option.
- Familiarity with Python. Here's a video tutorial.
- Familiarity with Jupyter Notebooks. Learn how to load sample Python notebooks.
Example code
The example for this quickstart is stored in a Jupyter Notebook. This notebook format allows you to not only see the code alongside detailed explanations, but also allows you to try out the code.
This quickstart notebook walks you through how to:
Load the example data
Import the microsoftml package
Add transforms for featurization
Train and evaluate the model
Predict using the model on new data
You can try it yourself with the notebook.
► Download the Jupyter Notebook to try it out.
Next steps
Now that you've tried this example, you can start developing your own solutions using the MicrosoftML packages and APIs for R and Python:
See also
For more about Machine Learning Server in general, see Overview of Machine Learning Server
For more machine learning samples using the microsoftml Python package, see Python samples for MicrosoftML.