Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3723 for trunk


Ignore:
Timestamp:
05/08/10 18:07:59 (15 years ago)
Author:
gkronber
Message:

Added default problem data for symbolic regression problems. #938 (Data types and operators for regression problems)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs

    r3566 r3723  
    3232        try {
    3333          Content.ImportFromFile(openFileDialog.FileName);
     34          importButton.Enabled = false;
    3435        }
    3536        catch (Exception ex) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs

    r3651 r3723  
    3737  public class DataAnalysisProblemData : ParameterizedNamedItem {
    3838    private bool suppressEvents = false;
     39    #region default data
     40    // y = x^4 + x^3 + x^2 + x
     41    private readonly double[,] kozaF1 = new double[,] {
     42{2.017885919, -1.449165046},
     43{1.30060506,  -1.344523885},
     44{1.147134798, -1.317989331},
     45{0.877182504, -1.266142284},
     46{0.852562452, -1.261020794},
     47{0.431095788, -1.158793317},
     48{0.112586002, -1.050908405},
     49{0.04594507,  -1.021989402},
     50{0.042572879, -1.020438113},
     51{-0.074027291,  -0.959859562},
     52{-0.109178553,  -0.938094706},
     53{-0.259721109,  -0.803635355},
     54{-0.272991057,  -0.387519561},
     55{-0.161978191,  -0.193611001},
     56{-0.102489983,  -0.114215349},
     57{-0.01469968, -0.014918985},
     58{-0.008863365,  -0.008942626},
     59{0.026751057, 0.026054094},
     60{0.166922436, 0.14309643},
     61{0.176953808, 0.1504144},
     62{0.190233418, 0.159916534},
     63{0.199800708, 0.166635331},
     64{0.261502822, 0.207600348},
     65{0.30182879,  0.232370249},
     66{0.83763905,  0.468046718}
     67    };
     68    #endregion
    3969    #region parameter properties
    4070    public IValueParameter<Dataset> DatasetParameter {
     
    139169    public DataAnalysisProblemData()
    140170      : base() {
    141       Parameters.Add(new ValueParameter<Dataset>("Dataset", new Dataset()));
    142       Parameters.Add(new ValueParameter<ICheckedItemList<StringValue>>("InputVariables", new CheckedItemList<StringValue>()));
    143       Parameters.Add(new ConstrainedValueParameter<StringValue>("TargetVariable"));
    144       Parameters.Add(new ValueParameter<IntValue>("TrainingSamplesStart", new IntValue()));
    145       Parameters.Add(new ValueParameter<IntValue>("TrainingSamplesEnd", new IntValue()));
    146       Parameters.Add(new ValueParameter<IntValue>("TestSamplesStart", new IntValue()));
    147       Parameters.Add(new ValueParameter<IntValue>("TestSamplesEnd", new IntValue()));
     171      var inputVariables = new CheckedItemList<StringValue>();
     172      StringValue inputVariable = new StringValue("x");
     173      inputVariables.Add(inputVariable);
     174      StringValue targetVariable = new StringValue("y");
     175      var validTargetVariables = new ItemSet<StringValue>();
     176      validTargetVariables.Add(targetVariable);
     177      Parameters.Add(new ValueParameter<Dataset>("Dataset", new Dataset(new string[] { "y", "x" }, kozaF1)));
     178      Parameters.Add(new ValueParameter<ICheckedItemList<StringValue>>("InputVariables", inputVariables.AsReadOnly()));
     179      Parameters.Add(new ConstrainedValueParameter<StringValue>("TargetVariable", validTargetVariables, targetVariable));
     180      Parameters.Add(new ValueParameter<IntValue>("TrainingSamplesStart", new IntValue(0)));
     181      Parameters.Add(new ValueParameter<IntValue>("TrainingSamplesEnd", new IntValue(15)));
     182      Parameters.Add(new ValueParameter<IntValue>("TestSamplesStart", new IntValue(15)));
     183      Parameters.Add(new ValueParameter<IntValue>("TestSamplesEnd", new IntValue(25)));
    148184      RegisterParameterEventHandlers();
    149185      RegisterParameterValueEventHandlers();
Note: See TracChangeset for help on using the changeset viewer.