GithubHelp home page GithubHelp logo

isabella232 / machinelearningsamples-lr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/machinelearningsamples-lr

0.0 0.0 0.0 34 KB

Simple Linear Regression Sample

License: MIT License

Python 100.00%

machinelearningsamples-lr's Introduction

Simple Linear Regression

NOTE This content is no longer maintained. Visit the Azure Machine Learning Notebook project for sample Jupyter notebooks for ML and deep learning with Azure Machine Learning.

This sample creates a simple linear regression on one-dimensional data using a closed-form solution. It shows how to use matplotlib to plot the data and the fitted line, and save a plot file (png format) to view it in the Runs view in Azure Machine Learning Workbench.

Once your script is executed, you can see your plot as part of your run history in Azure ML Workbench by navigating to the Runs section in your project and clicking on your run.

Instructions for running the script from CLI window

You can run your scripts from the Workbench app. However, we use the command-line window to watch the feedback in real time.

Running your simple linear regression script locally

Open the command-line window by clicking on File --> Open Command Prompt and install the matplotlib using the following command.

conda install matplotlib

Once matplotlib is installed, you can run the following command to run this sample.

$ az ml experiment submit -c local linear_reg.py

Running your linear regression script on local or remote Docker

If you have a Docker engine running locally, you can run linear_reg.py in a local docker container. Since Docker-based runs are managed by conda_dependencies.yml file, it needs to have a reference to the matplotlib library. This sample already has that reference.

dependencies:
  - matplotlib

Run the following command for executing your script on local Docker:

# submit the experiment to local Docker container for execution
$ az ml experiment submit -c docker linear_reg.py

You can also execute your script on Docker on a remote machine. Similar to local Docker execution, conda_dependencies.yml needs to have the following reference:

dependencies:
  - matplotlib

If you have a compute target named myvm for a remote VM, you can run the following command to execute your script:

$ az ml experiment submit -c myvm linear_reg.py

You can use this command to create a compute target.

$ az ml computetarget attach --name myvm --address <ip address or FQDN> --username <username> --password <pwd> --type remotedocker

Note: Your first execution on docker-based compute target automatically downloads a base Docker image. For that reason, it takes a few minutes before your job starts to run. Your environment is then cached to make subsequent runs faster.

machinelearningsamples-lr's People

Contributors

gokhanuluderya-msft avatar hning86 avatar rloutlaw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.