예제 #1
0
        internal static DataSettings DeserializeDataSettings(JsonElement element)
        {
            string targetColumnName = default;
            Optional <TestDataSettings> testData     = default;
            TrainingDataSettings        trainingData = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("targetColumnName"))
                {
                    targetColumnName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("testData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        testData = null;
                        continue;
                    }
                    testData = TestDataSettings.DeserializeTestDataSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("trainingData"))
                {
                    trainingData = TrainingDataSettings.DeserializeTrainingDataSettings(property.Value);
                    continue;
                }
            }
            return(new DataSettings(targetColumnName, testData.Value, trainingData));
        }
예제 #2
0
        internal static TableVerticalDataSettings DeserializeTableVerticalDataSettings(JsonElement element)
        {
            Optional <TableVerticalValidationDataSettings> validationData = default;
            Optional <string>           weightColumnName = default;
            string                      targetColumnName = default;
            Optional <TestDataSettings> testData         = default;
            TrainingDataSettings        trainingData     = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("validationData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        validationData = null;
                        continue;
                    }
                    validationData = TableVerticalValidationDataSettings.DeserializeTableVerticalValidationDataSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("weightColumnName"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        weightColumnName = null;
                        continue;
                    }
                    weightColumnName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("targetColumnName"))
                {
                    targetColumnName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("testData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        testData = null;
                        continue;
                    }
                    testData = TestDataSettings.DeserializeTestDataSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("trainingData"))
                {
                    trainingData = TrainingDataSettings.DeserializeTrainingDataSettings(property.Value);
                    continue;
                }
            }
            return(new TableVerticalDataSettings(targetColumnName, testData.Value, trainingData, validationData.Value, weightColumnName.Value));
        }
예제 #3
0
 internal TableVerticalDataSettings(string targetColumnName, TestDataSettings testData, TrainingDataSettings trainingDataSettings, TableVerticalValidationDataSettings validationData, string weightColumnName) : base(targetColumnName, testData, trainingDataSettings)
 {
     ValidationData   = validationData;
     WeightColumnName = weightColumnName;
 }
예제 #4
0
 internal NlpVerticalDataSettings(string targetColumnName, TestDataSettings testData, TrainingDataSettings trainingDataSettings, NlpVerticalValidationDataSettings validationData) : base(targetColumnName, testData, trainingDataSettings)
 {
     ValidationData = validationData;
 }
예제 #5
0
 internal DataSettings(string targetColumnName, TestDataSettings testData, TrainingDataSettings trainingDataSettings)
 {
     TargetColumnName     = targetColumnName;
     TestData             = testData;
     TrainingDataSettings = trainingDataSettings;
 }