---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# MLPredictor - グローバル (使用廃止)

# MLPredictor - グローバル (使用廃止) {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：22分

MLPredictor API は、予測インテリジェンス予測のためのユーティリティメソッドを提供します。  
注:  
この API は廃止され、将来のリリースで削除される予定です。最新のガイドラインについては、「 [ML API の使用](https://www.servicenow.com/docs/access?context=using-ml-apis&version=australia&pubname=australia-intelligent-experiences&ft:locale=en-US) 」を参照してください。

MLPredictor API には 予測インテリジェンス プラグイン (com.glide.platform_ml) が必要で、`sn_ml` 名前空間内で提供されます。

このクラスには、入力データから予測結果を取得するために必要なすべてのメソッドが含まれています。

## MLPredictor:MLPredictor() {#ariaid-title2}

新しい MLPredictor オブジェクトをインスタンス化します。
{#r_MLP-MLPredictor__table_n2c_mk4_3gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 1. パラメーター]

{#r_MLP-MLPredictor__table_n2c_mk4_3gb}  
次の例は、ビジネスルールで MLPredictor オブジェクトを使用して、予測後の最終値を記録する方法を示しています。

    function executeRule(current, previous /*null when async*/) {
    	var predictor = new MLPredictor();
    	predictor.recordFinalValuesInPredictionResults(current, "On close");

    }(current, previous);

## MLPredictor - applyPrediction(GlideRecord now_GR, Array solutions) {#ariaid-title3}

指定されたソリューションのアレイから指定されたレコードに予測値を設定します。
{#r_MLP-applyPrediction_GR_A__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | 予測されたソリューションのアレイを適用するレコード。 |
| ソリューション | アレイ | GlideRecord に関連付けられている指定されたソリューションオブジェクト。 |
[表 : 2. パラメーター]

{#r_MLP-applyPrediction_GR_A__table_hqw_pbm_yfb} {#r_MLP-applyPrediction_GR_A__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 3. 返される内容]

{#r_MLP-applyPrediction_GR_A__table_iqw_pbm_yfb}  
次の例は、ビジネスルールで applyPrediction() メソッドを使用する方法を示しています。

    (function executeRule(current, previous /*null when async*/) {
        var mlPredictor = new MLPredictor();
        //Get the list of active solutions for the glide record table
        var solutions = mlPredictor.findActiveSolutionsForRecord(current);
        //Run prediction and apply predicted value to the record
        mlPredictor.applyPrediction(current, solution);

    })(current, previous);

## MLPredictor - applyPredictionForSolution(GlideRecord now_GR, Object solution) {#ariaid-title4}

指定された分類ソリューションからの予測値を指定された GlideRecord に適用します。
GlideRecord 内のソリューションごとに、このメソッドを呼び出して結果を予測し、インシデントのフィールド値をそれらの結果に設定します。
{#r_MLP-applyPredictionForSolution_G_O__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | 予測を実行し、結果を適用する値を含む GlideRecord オブジェクト。 |
| solution | オブジェクト | 実行する分類ソリューションオブジェクト。 |
[表 : 4. パラメーター]

{#r_MLP-applyPredictionForSolution_G_O__table_hqw_pbm_yfb} {#r_MLP-applyPredictionForSolution_G_O__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | 予測が成功した場合は true、それ以外の場合はエラーになります。 |
[表 : 5. 返される内容]

{#r_MLP-applyPredictionForSolution_G_O__table_iqw_pbm_yfb}  
このテンプレートを使用するには、インシデントベースの予測 (テンプレート) ビジネスルールをコピーし、新しいレコードをアクティブにして、コメントに示された指示に従って solutionNames 変数を初期化します。

    (function executeRule(current, previous /*null when async*/) {
    	var solutionNames = ["solution1", "solution2", ...];

    	/* For domain separation (MSP) use case */
    //	var solutionNames;
    //	if (current.sys_domain == "A")
    //		solutionNames = ["solution_A1", "solution_A2", ...];
    //	else if (current.sys_domain == "B")
    //		solutionNames = ["solution_B1", "solution_B2", ...];
    //	else
    //		...

    	var predictor = new MLPredictor();
    	var info = "";
    	solutionNames.forEach(function(solutionName) {
    		var solution = predictor.findActiveSolution(solutionName);
    		if (!solution)
    			return;

    		/* The next line of code does the prediction and updates the current record. */
    		predictor.applyPredictionForSolution(current, solution);

    		/* If no prediction is done, do not build the prediction info message. */
    		if (!predictor.applyPredictionForSolution(current, solution))
    			return;

    		/* If user doesn't have 'itil' role, we don't build prediction info message. */
    		if (!gs.hasRole('itil'))
    			return;

    		/* Building prediction info message */
    		var fieldName = solution.getPredictedField();
    		var fieldLabel = current.getElement(fieldName).getED().getLabel();
    		var predictedDisplayValue = current.getDisplayValue(fieldName);
    		var msg = gs.getMessage("Predicted {0} for {1}.", [predictedDisplayValue, fieldLabel]);
    		if (info.length > 0)
    			info += " ";
    		info += msg;
    	});
    	/* Print out prediction info message on screen. */
    	if (info.length > 0) {
    		var incidentUrl = "<a href='"+current.getLink()+"'>"+current.number+":</a>";
    		gs.addInfoMessage(incidentUrl + " " + info);
    	}
    })(current, previous);

## MLPredictor - findActiveSolution(文字列 solutionName) {#ariaid-title5}

ソリューションオブジェクトを取得します。
このメソッドは、ml_solution定義とソリューションがアクティブな場合にのみソリューションを返します。
{#r_MLP-findActiveSolution_S__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| solutionName | 文字列 | ml_solutionレコードの名前。 |
[表 : 6. パラメーター]

{#r_MLP-findActiveSolution_S__table_hqw_pbm_yfb} {#r_MLP-findActiveSolution_S__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| オブジェクト | ml_solution定義とソリューションがアクティブな場合は、指定された `solutionName` のソリューションオブジェクト。それ以外の場合は null。 |
[表 : 7. 返される内容]

{#r_MLP-findActiveSolution_S__table_iqw_pbm_yfb}  
この例では、ハードコードされた値を受け取り、指定された機械学習モデルに渡します。結果変数と信頼度変数を使用して、値やその他のビジネスロジックを設定できます。

    var solutionName = 'ml_incident_assignment';
      var shortDescriptionValue = "Unable to connect!"
      var input = {
      short_description : shortDescriptionValue
      };
      var MLP = new MLPredictor();
      var solution = MLP.findActiveSolution(solutionName);
      var predictedOutcome = solution.predictText(input);
      var outcome = predictedOutcome.predictedValue();
      var confidence = predictedOutcome.confidence();
      gs.info("Predicted value: " + outcome)
      gs.info("Confidence: " + confidence)
            
出力:

    DxC_ML:
            ******* Finished Prediction********* *** Script: Predicted value: Software *** Script:
            Confidence: 80.78079080096245

## MLPredictor - findActiveSolutionsForRecord(GlideRecord now_GR) {#ariaid-title6}

指定された GlideRecord 内のテーブルのアクティブなソリューションを取得します。
{#r_MLP-findActiveSolutionsForRecord_GR__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | アクティブなソリューションオブジェクトを収集する GlideRecord。 |
[表 : 8. パラメーター]

{#r_MLP-findActiveSolutionsForRecord_GR__table_hqw_pbm_yfb} {#r_MLP-findActiveSolutionsForRecord_GR__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | 指定されたレコードの対象となるテーブルに関連付けられたアクティブなソリューションオブジェクトのアレイ。 |
[表 : 9. 返される内容]

{#r_MLP-findActiveSolutionsForRecord_GR__table_iqw_pbm_yfb}  
このスクリプトは GlideRecord (インシデントなど) を渡し、GlideRecord のすべてのソリューションを処理して、それぞれの値を返します。

    /* This is only to get a hard-coded GR */
         var current = new GlideRecord('incident');
         current.get('965c9e5347c12200e0ef563dbb9a7156');
         var predictor = new MLPredictor();
         var solutions = predictor.findActiveSolutionsForRecord(current);
         solutions.forEach(function(solution) {
             var outcome = solution.predict(current);
             /* Use this to set the field to the predicted value in the GlideRecord */
             var fieldName = solution.getPredictedField();
             current[fieldName] = outcome.predictedValue();
             current.update();

             gs.info("Predicted value: " + outcome.predictedValue())
             gs.info("Confidence: " + outcome.confidence())
    });

出力 (アサイン先グループ予測):

    DxC_ML: ******* Finished Prediction*********
            *** Script: Predicted value: Software *** Script: Confidence:
            99.74530683715315

出力 (カテゴリ予測):

    DxC_ML:
            ******* Finished Prediction********* *** Script: Predicted value: Software *** Script:
            Confidence: 98.7172805135524

## MLPredictor:getPredictedValue(オブジェクトソリューション、オブジェクト結果) {#ariaid-title7}

指定された予測結果に基づいて、指定されたソリューションの予測値を取得します。
{#r_MLP-getPredictedValue_O_O__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| solution | オブジェクト | 予測値を取得するソリューション。 |
| outcome | オブジェクト | 指定されたソリューションの予測結果 (var outcome = solution.predict(now_GR))。 |
[表 : 10. パラメーター]

{#r_MLP-getPredictedValue_O_O__table_hqw_pbm_yfb} {#r_MLP-getPredictedValue_O_O__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 予測の指定された結果に基づいた、指定されたソリューションの予測値。 |
| Null | 予測の信頼性がしきい値を満たさない場合は null を返します。 |
[表 : 11. 返される内容]

{#r_MLP-getPredictedValue_O_O__table_iqw_pbm_yfb}

## MLPredictor - getPredictions(GlideRecord now_GR、オブジェクトソリューション、オブジェクトオプション) {#ariaid-title8}

指定されたソリューションの予測を取得します。
{#r_MLP-getPredictions_GR_O_S__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | 予測する GlideRecord。 |
| solution | オブジェクト | 実行するソリューションオブジェクト。 |
| オプション | オブジェクト | 次のプロパティを持つオプションの JSON オブジェクトキー値ペア: * options.top_n:指定した場合、予想される予測数までの結果を返します。それ以外の場合は、デフォルトは ` glide.platform_ml.max_num_predictions` システムプロパティから読み込まれます。 * options.apply_threshold:ソリューションのしきい値 (類似性のソリューションしきい値、分類のクラスレベルしきい値) をチェックし、結果セットに適用します。デフォルト値は true です。 {#r_MLP-getPredictions_GR_O_S__ul_bw2_x1s_2gb} |
[表 : 12. パラメーター]

{#r_MLP-getPredictions_GR_O_S__table_hqw_pbm_yfb} {#r_MLP-getPredictions_GR_O_S__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | 予測される結果オブジェクトのアレイ |
[表 : 13. 返される内容]

{#r_MLP-getPredictions_GR_O_S__table_iqw_pbm_yfb}  
次の例では、指定されたソリューションを呼び出し、それに対して予測を実行します。

    function printOutcomeArr(outcomeArr) {
    gs.print('################## Results ##################');
    for (var i=0; i<outcomeArr.length; i++) {
        var outcome = outcomeArr[i];
        gs.print((i+1) + ' : ' + outcome.predictedValue() + ', ' + outcome.predictedValueSysId() + ', ' + outcome.confidence());
    }
    }

    var solutionName = 'ml_x_snc_global_prop_flip_test';
    var predictor = new MLPredictor();
    var solution = predictor.findActiveSolution(solutionName);

    var now_GR = new GlideRecord('incident');
    now_GR.get('1c741bd70b2322007518478d83673af3');

    var options = {};
    options.top_n = '10';            // top_n is an integer between 1 and 1000
    options.apply_threshold = false; // Value can be set to true or false

    printOutcomeArr(predictor.getPredictions(now_GR, solution, options));

## MLPredictor:isClassificationSolution(オブジェクトソリューション) {#ariaid-title9}

ソリューションオブジェクトが分類タイプであるかどうかを識別します。
{#r_MLP-isClassificationSolution_O__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| solution | オブジェクト | ML ソリューションの名前。 |
[表 : 14. パラメーター]

{#r_MLP-isClassificationSolution_O__table_hqw_pbm_yfb} {#r_MLP-isClassificationSolution_O__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | 入力ソリューションが分類タイプの場合は true を返し、それ以外の場合は false を返します。 |
[表 : 15. 返される内容]

{#r_MLP-isClassificationSolution_O__table_iqw_pbm_yfb}  

    var isClassificationSolution = this.isClassificationSolution(solution);
     
    	//classification solution each class has different threshold
    	//therefore needs to get all the results from ml engine
    	if (applyThreshold && isClassificationSolution) {
    		var maxClassificationTopN = 50;
    		outcomeArr = solution.predictTopN(now_GR, maxClassificationTopN);
    	}
    	else  {
    	outcomeArr = solution.predictTopN(now_GR, topN);
    	}
     
    	if (outcomeArr === null) {
    		//instead of returning null returning empty array
    		return [];
    	}

## MLPredictor:isSimilaritySolution(オブジェクトソリューション) {#ariaid-title10}

ソリューションオブジェクトが類似タイプであるかどうかを識別します。
{#r_MLP-isSimilaritySolution_O__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| solution | オブジェクト | ML ソリューションの名前。たとえば、ml_incident_categorization などです。 |
[表 : 16. パラメーター]

{#r_MLP-isSimilaritySolution_O__table_hqw_pbm_yfb} {#r_MLP-isSimilaritySolution_O__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | 入力ソリューションが類似性タイプの場合は true を返し、それ以外の場合は false を返します。 |
[表 : 17. 返される内容]

{#r_MLP-isSimilaritySolution_O__table_iqw_pbm_yfb}

## MLPredictor:outcome.confidence() {#ariaid-title11}

予測値の信頼性を取得します。
{#r_MLP-outcome-confidence__table_kvc_vgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 18. パラメーター]

{#r_MLP-outcome-confidence__table_kvc_vgx_ggb} {#r_MLP-outcome-confidence__table_lvc_vgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 予測の推定精度 (パーセンテージ)。例: **53.84615375762915**。 |
[表 : 19. 返される内容]

{#r_MLP-outcome-confidence__table_lvc_vgx_ggb}  

    var MLP = new MLPredictor();
      var solution = MLP.findActiveSolution(solutionName);
      var predictedOutcome = solution.predictText(input);
      var outcome = predictedOutcome.predictedValue();
      var confidence = predictedOutcome.confidence();
      gs.info("Predicted value: " + outcome)
      gs.info("Confidence: " + confidence)

## MLPredictor - outcome.predictedValue() {#ariaid-title12}

MLPredictor 結果オブジェクトから予測値を取得します。
{#r_MLP-outcome-predictedValue__table_l4k_sgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 20. パラメーター]

{#r_MLP-outcome-predictedValue__table_l4k_sgx_ggb} {#r_MLP-outcome-predictedValue__table_m4k_sgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 結果オブジェクトからの予測値。 |
[表 : 21. 返される内容]

{#r_MLP-outcome-predictedValue__table_m4k_sgx_ggb}  

    var MLP = new MLPredictor();
      var solution = MLP.findActiveSolution(solutionName);
      var predictedOutcome = solution.predictText(input);
      var outcome = predictedOutcome.predictedValue();
      var confidence = predictedOutcome.confidence();
      gs.info("Predicted value: " + outcome)
      gs.info("Confidence: " + confidence)

## MLPredictor - outcome.predictedValueSysId() {#ariaid-title13}

予測値のsys_idを取得します。
{#r_MLP-outcome-predictedValueSysId__table_bpp_xgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 22. パラメーター]

{#r_MLP-outcome-predictedValueSysId__table_bpp_xgx_ggb} {#r_MLP-outcome-predictedValueSysId__table_cpp_xgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 予測値sys_id。 |
[表 : 23. 返される内容]

{#r_MLP-outcome-predictedValueSysId__table_cpp_xgx_ggb}  

    function printOutcomeArr(outcomeArr) {
    gs.print('################## Results ##################');
    for (var i=0; i<outcomeArr.length; i++) {
        var outcome = outcomeArr[i];
        gs.print((i+1) + ' : ' + outcome.predictedValue() + ', ' + outcome.predictedValueSysId() + ', ' + outcome.confidence());
    }

## MLPredictor - recordFinalValuesInPredictionResults(GlideRecord now_GR, 文字列 reason) {#ariaid-title14}

オプションで指定された理由を使用して、最終予測結果値を指定された GlideRecord に設定します。
{#r_MLP-recordFinalValuesInPredictionResults_GR_S__table_hqw_pbm_yfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | 最終的な予測結果値を設定する GlideRecord。 |
| 理由 | 文字列 | オプション。結果を適用する理由。 |
[表 : 24. パラメーター]

{#r_MLP-recordFinalValuesInPredictionResults_GR_S__table_hqw_pbm_yfb} {#r_MLP-recordFinalValuesInPredictionResults_GR_S__table_iqw_pbm_yfb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 25. 返される内容]

{#r_MLP-recordFinalValuesInPredictionResults_GR_S__table_iqw_pbm_yfb}  
次の例では、インシデントがクローズされると recordFinalValuesInPredictionResults() メソッドが呼び出されます。

    (function executeRule(current, previous /*null when async*/) {
    	var predictor = new MLPredictor();
    	predictor.recordFinalValuesInPredictionResults(current, "On close");

    })(current, previous);

## MLPredictor - solution.getCapability() {#ariaid-title15}

トレーニング済みソリューションの機能情報を取得します。
{#r_MLP-solution-getCapability__table_em3_pfx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 26. パラメーター]

{#r_MLP-solution-getCapability__table_em3_pfx_ggb} {#r_MLP-solution-getCapability__table_fm3_pfx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | トレーニング済みソリューションの定義 ID とバージョン。それ以外の場合はエラーメッセージ |
[表 : 27. 返される内容]

{#r_MLP-solution-getCapability__table_fm3_pfx_ggb}

## MLPredictor - solution.getName() {#ariaid-title16}

予測に使用されるソリューションの名前を取得します。
{#r_MLP-solution-getName__table_ufz_pgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 28. パラメーター]

{#r_MLP-solution-getName__table_ufz_pgx_ggb} {#r_MLP-solution-getName__table_vfz_pgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 予測に使用するソリューションの名前。例: `ml_incident_categorization` |
[表 : 29. 返される内容]

{#r_MLP-solution-getName__table_vfz_pgx_ggb}

<br />

## MLPredictor - solution.getPredictedField() {#ariaid-title17}

ソリューションの予測値を取得します。
{#r_MLP-solution-getPredictedField__table_ukf_rdx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 30. パラメーター]

{#r_MLP-solution-getPredictedField__table_ukf_rdx_ggb} {#r_MLP-solution-getPredictedField__table_vkf_rdx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | ソリューションの予測出力フィールドの値 |
[表 : 31. 返される内容]

{#r_MLP-solution-getPredictedField__table_vkf_rdx_ggb}  

    /* Get a hard-coded GR */
         var current = new GlideRecord('incident');
         current.get('965c9e5347c12200e0ef563dbb9a7156');
         var predictor = new MLPredictor();
         var solutions = predictor.findActiveSolutionsForRecord(current);
         solutions.forEach(function(solution) {
             var outcome = solution.predict(current);
             /* Use this to set the field to the predicted value in the GlideRecord */

             var fieldName = solution.getPredictedField();
             current[fieldName] = outcome.predictedValue();
             current.update();
             gs.info("Predicted value: " + outcome.predictedValue())
             gs.info("Confidence: " + outcome.confidence())
    });

## MLPredictor - solution.getThreshold(String className) {#ariaid-title18}

ソリューションのしきい値を取得します。
しきい値は、最小予測精度を反映するパーセンテージを表します。
{#r_MLP-solution-getThreshold__table_sk3_4dx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| className | 文字列 | ソリューション出力フィールドの指定されたカテゴリ値 |
[表 : 32. パラメーター]

{#r_MLP-solution-getThreshold__table_sk3_4dx_ggb} {#r_MLP-solution-getThreshold__table_tk3_4dx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 番号 | 0 〜 100 のパーセンテージで表されるしきい値。 |
[表 : 33. 返される内容]

{#r_MLP-solution-getThreshold__table_tk3_4dx_ggb}

<br />

## MLPredictor - solution.getVersion() {#ariaid-title19}

アクティブなソリューションのバージョンを取得します。
{#r_MLP-solution-getVersion__table_hrt_ngx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 34. パラメーター]

{#r_MLP-solution-getVersion__table_hrt_ngx_ggb} {#r_MLP-solution-getVersion__table_irt_ngx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | アクティブなソリューションのバージョン |
[表 : 35. 返される内容]

{#r_MLP-solution-getVersion__table_irt_ngx_ggb}

<br />

## MLPredictor - solution.isActive() {#ariaid-title20}

指定されたソリューションがアクティブかどうかを判定します。
{#r_MLP-solution-isActive__table_xzj_lgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 36. パラメーター]

{#r_MLP-solution-isActive__table_xzj_lgx_ggb} {#r_MLP-solution-isActive__table_yzj_lgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | ソリューションがアクティブな場合は true、それ以外の場合は false |
[表 : 37. 返される内容]

{#r_MLP-solution-isActive__table_yzj_lgx_ggb}

<br />

## MLPredictor - solution.predict(GlideRecord now_GR, オブジェクトしきい値) {#ariaid-title21}

ソリューション予測結果を結果オブジェクトとして取得します。
{#r_MLP-solution-predict__table_jhq_hgx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | ソリューション入力テーブルの GlideRecord |
| しきい値 | オブジェクト | しきい値 (類似性のソリューションレベルしきい値、分類のクラスレベルしきい値) |
[表 : 38. パラメーター]

{#r_MLP-solution-predict__table_jhq_hgx_ggb} {#r_MLP-solution-predict__table_khq_hgx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| オブジェクト | 指定されたソリューションの予測結果 (var outcome = solution.predict(now_GR)) |
[表 : 39. 返される内容]

{#r_MLP-solution-predict__table_khq_hgx_ggb}  

    solutions.forEach(function(solution) {
             var outcome = solution.predict(current);
             /* Use this to set the field to the predicted value in the GlideRecord
             var fieldName = solution.getPredictedField();
             current[fieldName] = outcome.predictedValue();
             current.update();
             */
             gs.info("Predicted value: " + outcome.predictedValue())
             gs.info("Confidence: " + outcome.confidence())
    });

## MLPredictor - solution.predictTopN(GlideRecord now_GR, Object topN) {#ariaid-title22}

予想される予測数までの結果オブジェクトのリストを返します。最大数は 1000 予測です。
{#r_MLP-solution-predictTopN__table_vv5_yfx_ggb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| now_GR | GlideRecord | ソリューションの GlideRecord |
| topN | オブジェクト | 予測の予想数。1000 を超える数は 1000 件の結果を返します |
[表 : 40. パラメーター]

{#r_MLP-solution-predictTopN__table_vv5_yfx_ggb} {#r_MLP-solution-predictTopN__table_wv5_yfx_ggb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | GlideRecord、しきい値、システム ID、予測の予想数を含むアレイ内の結果オブジェクトのリスト (topN オブジェクト) |
[表 : 41. 返される内容]

{#r_MLP-solution-predictTopN__table_wv5_yfx_ggb}  

    var isClassificationSolution = this.isClassificationSolution(solution);
     
    	//classification solution each class has different threshold
    	//therefore needs to get all the results from ml engine
    	if (applyThreshold && isClassificationSolution) {
    		var maxClassificationTopN = 50;
    		outcomeArr = solution.predictTopN(now_GR, maxClassificationTopN);
    	}
    	else  {
    		outcomeArr = solution.predictTopN(now_GR, topN);
    	}
     
    	if (outcomeArr === null) {
    		//instead of returning null returning empty array
    		return [];
    	}


