PredictabilityEstimateStore - 전역

  • 릴리스 버전: Xanadu
  • 업데이트 날짜 2024년 08월 01일
  • 읽기6분
  • 저장하고 검색할 수 있습니다 예측 가능성 추정치.

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

    PredictabilityEstimateStore - add(객체 mlEstimate)

    새 예측 가능성 예상치를 추가합니다. 저장소에 새 솔루션 개체를 추가하고 고유한 이름을 반환합니다.

    주:
    레이블 값은 고유할 필요가 없습니다. 예를 들어 동일한 레이블을 사용하여 이 메서드를 10번 실행하면 이 메서드는 고유하게 명명된 10개의 서로 다른 개체를 저장소에 추가합니다.
    표 1. 매개변수
    이름 유형 설명
    mlEstimate (영문) 예측 가능성 추정 예측 가능성 추정() 저장소에 추가할 객체입니다.
    표 2. 반환
    유형 설명
    문자열 시스템에서 생성된 예측 가능성 예상 이름입니다.

    추가하는 방법을 보여 줍니다 예측 가능성 추정치 저장소에PredictabilityEstimate 사용 - submitTrainingJob() 학습 작업을 스토어에 추가한 후 실행합니다.

    // Create a dataset 
    var myData = new sn_ml.DatasetDefinition({
    
      'tableName' : 'incident',
      'fieldNames' : ['assignment_group', 'short_description', 'description'],
      'encodedQuery' : 'activeANYTHING'
    
    });
    
    // Create an estimate 
    var myEstimate = new sn_ml.PredictabilityEstimate({
    
      'label': "my estimate definition",
      'dataset' : myData,
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames':['short_description']
    
    });
    
    // Add the estimate to the store to later be able to retrieve it.
    var my_unique_name = sn_ml.PredictabilityEstimateStore.add(myEstimate);

    PredictabilityEstimateStore - deleteObject(문자열 이름)

    저장소에서 지정된 예측 가능성 추정 객체를 제거합니다.

    표 3. 매개변수
    이름 유형 설명
    이름 문자열 PredictabilityEstimate() 삭제할 객체입니다. 의 이름
    표 4. 반환
    유형 설명
    없음

    다음 예제에서는 저장소에서 예측 가능성 예상치를 삭제하는 방법을 보여 줍니다.

    sn_ml.PredictabilityEstimateStore.deleteObject("ml_sn_global_global_estimate");

    PredictabilityEstimateStore - get(문자열 이름)

    저장소에서 예측 가능성 추정 객체를 가져옵니다.

    표 5. 매개변수
    이름 유형 설명
    이름 문자열 상점의 예측 가능성 예상 이름입니다.
    표 6. 반환
    유형 설명
    객체 예측 가능성 추정 객체. 개체가 없으면 오류를 반환합니다.

    다음 예제에서는 get() 메서드를 사용하여 저장소에서 예측 가능성 추정 개체를 가져오고 및 PredictabilityEstimateVersion - getStatus() 메서드를 사용하여 PredictabilityEstimate - getActiveVersion() 학습 상태를 보는 방법을 보여 줍니다.

    // Get status
    var mlEstimate = sn_ml.PredictabilityEstimateStore.get('ml_incident_categorization');
    
    gs.print(JSON.stringify(JSON.parse(mlEstimate.getActiveVersion().getStatus(), null, 2)));

    출력:

    {
     "state":"solution_complete",
     "percentComplete":"100",
     "hasJobEnded":"true"
    }

    PredictabilityEstimateStore - getAllNames(객체 옵션)

    저장소에 있는 모든 예측 가능성 추정 정의 기록의 이름을 가져옵니다.

    표 7. 매개변수
    이름 유형 설명
    옵션 객체 지정된 속성 내에서 결과를 제한하는 옵션입니다.
    {
      "label": "String",
      "domainName": "String",
      "scope": "String"
    };
    옵션.레이블 문자열 옵션입니다. 솔루션 개체의 레이블입니다.
    options.domainName 문자열 옵션입니다. 솔루션 개체의 도메인 이름입니다. 다음을 참조 Domain Separation 및 예측 인텔리전스.
    옵션.범위 문자열 옵션입니다. 솔루션 객체에 대한 애플리케이션 범위의 이름입니다.
    표 8. 반환
    유형 설명
    배열 저장소의 예측 가능성 예상 객체 이름을 나타내는 문자열 목록입니다.

    다음 예제에서 getAllNames() 메서드는 저장소의 모든 이름 목록을 반환합니다.

    gs.print(JSON.stringify(JSON.parse(sn_ml.PredictabilityEstimateStore.getAllNames()), null, 2));

    출력:

    [
      "ml_x_snc_global_global_predictability_estimate_1",
      "ml_x_snc_global_global_predictability_estimate",
      "ml_x_snc_global_global_predictability_estimate_2",
      "ml_x_snc_global_global_my_estimate_definition"
    ]

    다음 예제에서 getAllNames() 메서드는 매개 변수에 options 설정된 값과 연결된 이름만 반환합니다.

    var options = {
      'label' : 'my estimate definition',
      'domainName' : 'global',
      'scope' : 'global'
    };
    var solNames = sn_ml.PredictabilityEstimateStore.getAllNames(options);
    gs.print(JSON.stringify(JSON.parse(solNames), null, 2));

    출력:

    [
      "ml_x_snc_global_global_my_estimate_definition"
    ]

    PredictabilityEstimateStore - update(문자열 이름, 개체 mlEstimate)

    저장소에서 예측 가능성 예상 객체를 업데이트합니다.

    표 9. 매개변수
    이름 유형 설명
    이름 문자열 업데이트할 예측 가능성 예상치의 이름입니다.
    mlEstimate (영문) 예측 가능성 추정 예측 가능성 추정() 업데이트할 객체 속성입니다.
    표 10. 반환
    유형 설명
    없음

    다음 예제에서는 저장소에서 예측 가능성 예상 개체를 업데이트하는 방법을 보여 줍니다.

    var estimateUpdate = new sn_ml.PredictabilityEstimate({
      'label': 'my estimate definition',
      'dataset' : myData,
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames': ['short_description']
    });
    
    sn_ml.PredictabilityEstimateStore.update('ml_sn_global_global_incident_service', estimateUpdate);