Ignore:
Timestamp:
11/16/11 13:58:19 (11 years ago)
Author:
mkommend
Message:

#1479:

  • Renamed symbolic classification sample.
  • Updated samples unit test to use new features of the SymbolicExpressionGrammar.
  • Updated symbolic regression and classification sample.
  • Filtered symbolic in AllowedChildSymbolsView.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs

    r6938 r6999  
    280280      // configure grammar
    281281      var grammar = new TypeCoherentExpressionGrammar();
    282       grammar.Symbols.OfType<Sine>().Single().InitialFrequency = 0.0;
    283       grammar.Symbols.OfType<Cosine>().Single().InitialFrequency = 0.0;
    284       grammar.Symbols.OfType<Tangent>().Single().InitialFrequency = 0.0;
    285       grammar.Symbols.OfType<IfThenElse>().Single().InitialFrequency = 0.0;
    286       grammar.Symbols.OfType<GreaterThan>().Single().InitialFrequency = 0.0;
    287       grammar.Symbols.OfType<LessThan>().Single().InitialFrequency = 0.0;
    288       grammar.Symbols.OfType<And>().Single().InitialFrequency = 0.0;
    289       grammar.Symbols.OfType<Or>().Single().InitialFrequency = 0.0;
    290       grammar.Symbols.OfType<Not>().Single().InitialFrequency = 0.0;
    291       grammar.Symbols.OfType<TimeLag>().Single().InitialFrequency = 0.0;
    292       grammar.Symbols.OfType<Integral>().Single().InitialFrequency = 0.0;
    293       grammar.Symbols.OfType<Derivative>().Single().InitialFrequency = 0.0;
    294       grammar.Symbols.OfType<LaggedVariable>().Single().InitialFrequency = 0.0;
     282      grammar.ConfigureAsDefaultRegressionGrammar();
    295283      grammar.Symbols.OfType<VariableCondition>().Single().InitialFrequency = 0.0;
    296284      var varSymbol = grammar.Symbols.OfType<Variable>().Where(x => !(x is LaggedVariable)).Single();
     
    393381      // configure grammar
    394382      var grammar = new TypeCoherentExpressionGrammar();
    395       grammar.Symbols.OfType<Sine>().Single().InitialFrequency = 0.0;
    396       grammar.Symbols.OfType<Cosine>().Single().InitialFrequency = 0.0;
    397       grammar.Symbols.OfType<Tangent>().Single().InitialFrequency = 0.0;
    398       grammar.Symbols.OfType<Power>().Single().InitialFrequency = 0.0;
    399       grammar.Symbols.OfType<Root>().Single().InitialFrequency = 0.0;
    400       grammar.Symbols.OfType<TimeLag>().Single().InitialFrequency = 0.0;
    401       grammar.Symbols.OfType<Integral>().Single().InitialFrequency = 0.0;
    402       grammar.Symbols.OfType<Derivative>().Single().InitialFrequency = 0.0;
    403       grammar.Symbols.OfType<LaggedVariable>().Single().InitialFrequency = 0.0;
    404       grammar.Symbols.OfType<VariableCondition>().Single().InitialFrequency = 0.0;
     383      grammar.ConfigureAsDefaultClassificationGrammar();
     384      grammar.Symbols.OfType<VariableCondition>().Single().Enabled = false;
    405385      var varSymbol = grammar.Symbols.OfType<Variable>().Where(x => !(x is LaggedVariable)).Single();
    406386      varSymbol.WeightMu = 1.0;
Note: See TracChangeset for help on using the changeset viewer.