From 47cf59cecb9d616c0e2d52a1f369f0efbcf7ce3c Mon Sep 17 00:00:00 2001 From: lprovost-coveo <96265015+lprovost-coveo@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:49:33 -0500 Subject: [PATCH] feat(modeldetails): adding properties for supporting case classification (#902) --- .../ModelDetailedInfo/details/ModelDetails.ts | 4 ++++ .../details/ModelDetailsPreparationDetails.ts | 19 +++++++++++++++++++ .../details/ModelDetailsTrainingDetails.ts | 8 ++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsPreparationDetails.ts create mode 100644 src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsTrainingDetails.ts diff --git a/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetails.ts b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetails.ts index c965c35a..04104b97 100644 --- a/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetails.ts +++ b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetails.ts @@ -1,6 +1,8 @@ import {ModelDetailsBuildingStats} from './ModelDetailsBuildingStats.js'; import {ModelDetailsLanguages} from './ModelDetailsLanguages.js'; import {ModelDetailsSubModels} from './ModelDetailsSubModels.js'; +import {ModelDetailsPreparationDetails} from './ModelDetailsPreparationDetails.js'; +import {ModelDetailsTrainingDetails} from './ModelDetailsTrainingDetails.js'; export interface ModelDetails { possibleRecommendations?: number; @@ -17,4 +19,6 @@ export interface ModelDetails { subModels?: {[key: string]: ModelDetailsSubModels}; candidates?: number; modelDetailedBuildingStats?: ModelDetailsBuildingStats; + modelDetailedTrainingDetails: ModelDetailsTrainingDetails; + modelDetailedPreparationDetails: ModelDetailsPreparationDetails; } diff --git a/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsPreparationDetails.ts b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsPreparationDetails.ts new file mode 100644 index 00000000..c8b5d0b8 --- /dev/null +++ b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsPreparationDetails.ts @@ -0,0 +1,19 @@ +interface DatasetFieldDetails { + numSamples: number; + labelsDistribution: Record; +} + +interface FacetDetails { + facetLabels: Record; +} + +interface DatasetDetails { + numRows: number; + dataDetails: Record; +} + +export interface ModelDetailsPreparationDetails { + trainDatasetsDetails: DatasetDetails; + testDatasetsDetails: DatasetDetails; + facetDetails: FacetDetails; +} diff --git a/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsTrainingDetails.ts b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsTrainingDetails.ts new file mode 100644 index 00000000..9c31fd6b --- /dev/null +++ b/src/resources/MachineLearning/ModelDetailedInfo/details/ModelDetailsTrainingDetails.ts @@ -0,0 +1,8 @@ +interface FacetPerformanceDetails { + hit1: number; + hit3: number; +} + +export interface ModelDetailsTrainingDetails { + performanceDetails: Record; +}