適用於 Node.js 的 Azure Machine Learning 模組Azure Machine Learning modules for Node.js

機器學習服務是一項資料科學技術,協助電腦從現有的資料學習,以便預測未來的行為、結果和趨勢。Machine learning is a technique of data science that helps computers learn from existing data in order to forecast future behaviors, outcomes, and trends. 機器學習服務的這些預測可讓應用程式和裝置更聰明。These forecasts or predictions from machine learning can make apps and devices smarter. 當您線上購物時,機器學習服務可根據您已經購買的產品,協助推薦其他產品。When you shop online, machine learning helps recommend other products you might like based on what you've purchased. 當您的信用卡被刷過時,機器學習服務可將該筆交易與交易資料庫進行比對,協助偵測詐騙。When your credit card is swiped, machine learning compares the transaction to a database of transactions and helps detect fraud. 當您的真空吸塵器機器人清潔房間時,機器學習服務可協助它判斷作業是否完成。When your robot vacuum cleaner vacuums a room, machine learning helps it decide whether the job is done.

管理套件Management Package

安裝 npm 模組Install the npm module

安裝 Azure Machine Learning npm 模組Install the Azure Machine Learning npm module

npm install azure-arm-machinelearning

範例Example

此範例會列出所有的機器學習認可方案。This example lists all machine learning committment plans.

const msRestAzure = require('ms-rest-azure');
const MachineLearningManagement = require('azure-arm-machinelearning');

const subscriptionId = 'your-subscription-id';

msRestAzure
  .interactiveLogin()
  .then(credentials => {
    const client = new MachineLearningManagement.CommitmentPlansManagementClient(
      credentials,
      subscriptionId
    );
    return client.commitmentPlans.list();
  })
  .then(commitmentPlans => {
    console.log('List of commitmentPlans:');
    console.dir(commitmentPlans, { depth: null, colors: true });
  });

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.