---
sourceDocument: Xanadu API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - ko-KR

ft:publication_title :

    - Xanadu API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# MLSolutionUtil - 전역

# MLSolutionUtil - 전역 {#ariaid-title1}

* 릴리스 버전: Xanadu
* 
* 업데이트 날짜 2024년 08월 01일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 3분

MLSolutionUtil 스크립트 포함은 예측을 가져오기 예측 인텔리전스 위한 메서드를 제공합니다.

이 스크립트 포함에는 플러그인(com.glide.platform_ml)이 필요하며 예측 인텔리전스`sn_ml` 네임스페이스 내에서 제공됩니다.

자세한 내용은 [ML API 사용을](https://www.servicenow.com/docs/access?context=using-ml-apis&version=xanadu&pubname=xanadu-intelligent-experiences&ft:locale=en-US) 참조하세요.
**관련 개념**   

* [MLSolution](https://servicenow-prod.fluidtopics.net/Fb2ydpfR8R9k1iVqW7Lx1Q#MLSolutionAPI "MLSolution API는 예측을 처리 예측 인텔리전스 하고 유사성, 분류 및 클러스터링과 같은 모든 기능에 대한 솔루션 객체를 검색하는 메서드를 제공합니다.")
* [MLSolutionFactory](https://servicenow-prod.fluidtopics.net/O~MV8Duof4DeIOi5L_nZ3g#MLSolutionFactoryAPI "MLSolutionFactory API는 MLSolution 스크립트 가능 객체를 가져오는 팩토리 클래스입니다.")

## MLSolutionUtil - MLSolutionUtil() {#ariaid-title2}

새 MLSolutionUtil 개체를 인스턴스화합니다.
{#MLSU-MLSolutionUtil__table_btj_twt_rhb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 없음 |   |   |
[표 1. 매개변수]

{#MLSU-MLSolutionUtil__table_btj_twt_rhb}  


    var mlSolutionUtil = new MLSolutionUtil();

## MLSolutionUtil - getPredictions(객체 입력, 배열 solutionNames, 객체 옵션) {#ariaid-title3}

하나 이상의 지정된 솔루션에 대한 예측을 가져옵니다.
{#MLSU-getPredictions_O_A_O__table_hqw_pbm_yfb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 입력 | 객체 | GlideRecord 또는 JSON 객체의 배열을 키-값 쌍으로 표시합니다. |
| solutionNames (영문) | 배열 | 예측을 검색할 솔루션 이름의 배열입니다. |
| 옵션 | 객체 | 옵션입니다. 다음 속성이 있는 JSON 객체 키-값 쌍: * top_n: 숫자. 제공된 경우 지정된 예측 수까지 상위 결과를 반환합니다.{#MLSU-getPredictions_O_A_O__solution-prediction-topn} * apply_threshold: 부울. 솔루션의 임계값을 확인하고 결과 집합에 적용합니다. 임계값은 유사성에 대한 솔루션 임계값 또는 분류에 대한 클래스 수준 임계값입니다. 기본값은 true입니다.{#MLSU-getPredictions_O_A_O__solution-prediction-thresh} * custom_results_filter: 문자열. 유사성 솔루션만 해당됩니다. 인코딩된 쿼리를 사용하여 결과가 반환되는 허용된 집합을 지정합니다.{#MLSU-getPredictions_O_A_O__solution-prediction-custom} {#MLSU-getPredictions_O_A_O__ul_hdp_2cs_ckb} |
[표 2. 매개변수]

{#MLSU-getPredictions_O_A_O__table_hqw_pbm_yfb} {#MLSU-getPredictions_O_A_O__table_iqw_pbm_yfb__entry__2}

| 유형 | 설명 |
|-|-|
| 배열 | 솔루션 이름별로 그룹화되고 sys_id 또는 record_number별로 정렬된 예측 결과를 포함하는 JSON 키-값 쌍입니다. * predictedValue: 문자열입니다. 예측 결과를 나타내는 값입니다.{#MLSU-getPredictions_O_A_O__ml-returnsVal} * predictedSysId: 문자열입니다. 예측 값의 sys_id입니다. 결과가 예측되는 모든 테이블에서 나올 수 있습니다.{#MLSU-getPredictions_O_A_O__ml-returnsID} * confidence: 숫자입니다. 예측과 연결된 신뢰도 값입니다. 예: 53.84.{#MLSU-getPredictions_O_A_O__ml-returnsConf} * 임계값: 숫자. 예측과 연결된 구성된 임계치의 값입니다.{#MLSU-getPredictions_O_A_O__ml-returnsThrsh} * detailedResults: 개체입니다. 유사성 솔루션만 해당됩니다. 일치하는 텍스트 인덱스에 대한 상세 정보를 포함하는 JSON 키-값 쌍입니다.{#MLSU-getPredictions_O_A_O__ml-returnsDetR} {#MLSU-getPredictions_O_A_O__ul_nlj_5cs_ckb} |
[표 3. 반환]

{#MLSU-getPredictions_O_A_O__table_iqw_pbm_yfb}  

    var solutionNames = ['soluton1', 'solution2'];

    var input = new GlideRecord("incident");
    input.get("0ef47232db801300864adfea5e961912");

    // configure optional parameters
    var options = {};
    options.top_n = 3;
    options.apply_threshold = false;

    var mlSolutionUtil = new MLSolutionUtil();
    var results = mlSolutionUtil.getPredictions(input, solutionNames, options);

    // pretty print JSON results
    gs.print(JSON.stringify(JSON.parse(results), null, 2));

출력:

    {
      solution1:  {
        input_gr_sys_id1: [
                    {
                        predictedValue : xxx,
                        predictedSysId : xx0,
                        confidence : xxx,
                        threshold : xxx,
                        detailedResults : [.....]

                    }, 
                    {
                        predictedValue : yyy,
                        predictedSysId : xx1,
                        confidence : xxx,
                        threshold : xxx,
                        detailedResults : [.....]
                    }
            ],
        input_gr_sys_id2 : [
                    {
                        predictedValue : xxx,
                        predictedSysId : xx0,
                        confidence : xxx,
                        threshold : xxx,
                        detailedResults : [.....]

                    }, 
                ...
            ]
      }

      solution2:  {
          ...
    }


