| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | using System.Collections.Generic; |
| | | 10 | | using System.Linq; |
| | | 11 | | using Azure.AI.FormRecognizer.Training; |
| | | 12 | | using Azure.Core; |
| | | 13 | | |
| | | 14 | | namespace Azure.AI.FormRecognizer.Models |
| | | 15 | | { |
| | | 16 | | /// <summary> Custom model training result. </summary> |
| | | 17 | | internal partial class TrainResult |
| | | 18 | | { |
| | | 19 | | /// <summary> Initializes a new instance of TrainResult. </summary> |
| | | 20 | | /// <param name="trainingDocuments"> List of the documents used to train the model and any errors reported in ea |
| | | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="trainingDocuments"/> is null. </exception> |
| | 0 | 22 | | internal TrainResult(IEnumerable<TrainingDocumentInfo> trainingDocuments) |
| | | 23 | | { |
| | 0 | 24 | | if (trainingDocuments == null) |
| | | 25 | | { |
| | 0 | 26 | | throw new ArgumentNullException(nameof(trainingDocuments)); |
| | | 27 | | } |
| | | 28 | | |
| | 0 | 29 | | TrainingDocuments = trainingDocuments.ToList(); |
| | 0 | 30 | | Fields = new ChangeTrackingList<CustomFormModelField>(); |
| | 0 | 31 | | Errors = new ChangeTrackingList<FormRecognizerError>(); |
| | 0 | 32 | | } |
| | | 33 | | |
| | | 34 | | /// <summary> Initializes a new instance of TrainResult. </summary> |
| | | 35 | | /// <param name="trainingDocuments"> List of the documents used to train the model and any errors reported in ea |
| | | 36 | | /// <param name="fields"> List of fields used to train the model and the train operation error reported by each. |
| | | 37 | | /// <param name="averageModelAccuracy"> Average accuracy. </param> |
| | | 38 | | /// <param name="errors"> Errors returned during the training operation. </param> |
| | 148 | 39 | | internal TrainResult(IReadOnlyList<TrainingDocumentInfo> trainingDocuments, IReadOnlyList<CustomFormModelField> |
| | | 40 | | { |
| | 148 | 41 | | TrainingDocuments = trainingDocuments; |
| | 148 | 42 | | Fields = fields; |
| | 148 | 43 | | AverageModelAccuracy = averageModelAccuracy; |
| | 148 | 44 | | Errors = errors; |
| | 148 | 45 | | } |
| | | 46 | | |
| | | 47 | | /// <summary> List of the documents used to train the model and any errors reported in each document. </summary> |
| | 140 | 48 | | public IReadOnlyList<TrainingDocumentInfo> TrainingDocuments { get; } |
| | | 49 | | /// <summary> List of fields used to train the model and the train operation error reported by each. </summary> |
| | 136 | 50 | | public IReadOnlyList<CustomFormModelField> Fields { get; } |
| | | 51 | | /// <summary> Average accuracy. </summary> |
| | 68 | 52 | | public float? AverageModelAccuracy { get; } |
| | | 53 | | /// <summary> Errors returned during the training operation. </summary> |
| | 148 | 54 | | public IReadOnlyList<FormRecognizerError> Errors { get; } |
| | | 55 | | } |
| | | 56 | | } |