public void ConstantModelVariableImpactTest() { IClassificationProblemData problemData = LoadIrisProblem(); IClassificationModel model = new ConstantModel(5, "y"); IClassificationSolution solution = new ClassificationSolution(model, problemData); Dictionary <string, double> expectedImpacts = GetExpectedValuesForConstantModel(); CheckDefaultAsserts(solution, expectedImpacts); }
public void CustomModelVariableImpactNoInfluenceTest() { IClassificationProblemData problemData = CreateDefaultProblem(); ISymbolicExpressionTree tree = CreateCustomExpressionTreeNoInfluenceX1(); var model = new SymbolicNearestNeighbourClassificationModel(problemData.TargetVariable, 3, tree, new SymbolicDataAnalysisExpressionTreeInterpreter()); model.RecalculateModelParameters(problemData, problemData.TrainingIndices); IClassificationSolution solution = new ClassificationSolution(model, (IClassificationProblemData)problemData.Clone()); Dictionary <string, double> expectedImpacts = GetExpectedValuesForCustomProblemNoInfluence(); CheckDefaultAsserts(solution, expectedImpacts); }