public void connectContext(kFoldValidationCollection _master, kFoldValidationCase _case)
 {
     kFoldMaster = _master;
     kFoldCase   = _case;
     foreach (var col in this)
     {
         col.kFoldCase   = _case;
         col.kFoldMaster = _master;
     }
 }
        ///// <summary>
        ///// Gets the validation results table for complete collection
        ///// </summary>
        ///// <returns>DataTable</returns>
        //public DataTable GetValidationTable()
        //{

        //    String repTitle = context.setup.name + " - " + featureVectorExtractor.name;
        //    String repName = repTitle.getCleanFileName();

        //    DataTable table = new DataTable(repName);

        //    objectTable<DocumentSetCaseCollectionReport> output = new objectTable<DocumentSetCaseCollectionReport>(nameof(DocumentSetCaseCollectionReport.kFoldCase), repName);


        //    foreach (IWebPostClassifier classifier in context.setup.classifiers)
        //    {


        //        foreach (kFoldValidationCase valCase in items)
        //        {
        //            var r = valCase.testReport[classifier];


        //            i++;
        //            output.Add(r);
        //        }
        //        avgReport.DivideValues(i);
        //        output.Add(avgReport);
        //    }



        //    var dt = output.GetDataTable(null, repName);
        //    dt.GetTitle(repTitle);


        //    return dt;

        //}

        public kFoldValidationCase CreateNew(String valCaseName)
        {
            kFoldValidationCase valCase = new kFoldValidationCase();

            valCase.name = valCaseName;
            valCase.id   = items.Count;
            DeployCase(valCase);
            items.Add(valCase);
            return(valCase);
        }
        public kFoldValidationCase GetDiagnosticCase(DocumentSetClasses classes)
        {
            kFoldValidationCase valCase = new kFoldValidationCase();

            valCase.name = "Diagnostic";
            valCase.id   = items.Count;
            DeployCase(valCase);
            foreach (IDocumentSetClass c in classes.GetClasses())
            {
                valCase.trainingCases[c.classID].AddRange(c.WebSiteSample);
                valCase.evaluationCases[c.classID].AddRange(c.WebSiteSample);
            }


            return(valCase);
        }
 public void OnLoad(folderNode folder, ILogBuilder output)
 {
     if (folder != null)
     {
         this.folder = folder;
     }
     foreach (String className in valCaseNames)
     {
         kFoldValidationCase setClass = className.LoadDataStructure <kFoldValidationCase>(this.folder, output);
         setClass.kFoldMaster = this;
         setClass.evaluationCases.kFoldMaster = this;
         setClass.trainingCases.kFoldMaster   = this;
         setClass.id = items.Count;
         DeployCase(setClass);
         items.Add(setClass);
     }
 }
        public void DeployCase(kFoldValidationCase valCase, folderNode folderOverride = null)
        {
            var fl = folder;

            if (folderOverride != null)
            {
                fl = folderOverride;
            }
            valCase.kFoldMaster = this;
            valCase.trainingCases.kFoldMaster   = this;
            valCase.evaluationCases.kFoldMaster = this;
            valCase.evaluationCases.kFoldCase   = valCase;
            valCase.trainingCases.kFoldCase     = valCase;
            valCase.folder           = folder.Add(valCase.name, valCase.name, "Operational files and reports for k-fold [" + valCase.name + "]");
            valCase.caseFolder       = valCase.folder.Add("cases", "Cases", "Repository with knowledge on cases");
            valCase.caseSampleFolder = valCase.caseFolder.Add("microAnalysis", "Micro-analysis of FV Extraction", "Randomly picked cases for Micro-analysis of FV Extraction - similarity computation between a case and a category");
        }