Changeset 14277


Ignore:
Timestamp:
09/08/16 11:41:45 (5 years ago)
Author:
gkronber
Message:

#2650: merged r14245:14273 from trunk to branch (fixing conflicts in RegressionSolutionTargetResponseGradientView)

Location:
branches/symbreg-factors-2650
Files:
8 added
3 deleted
36 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NonlinearRegression/NonlinearRegression.cs

    r14251 r14277  
    3232using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3333using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
     34using HeuristicLab.Random;
    3435
    3536namespace HeuristicLab.Algorithms.DataAnalysis {
     
    4445    private const string ModelStructureParameterName = "Model structure";
    4546    private const string IterationsParameterName = "Iterations";
     47    private const string RestartsParameterName = "Restarts";
     48    private const string SetSeedRandomlyParameterName = "SetSeedRandomly";
     49    private const string SeedParameterName = "Seed";
    4650
    4751    public IFixedValueParameter<StringValue> ModelStructureParameter {
     
    5054    public IFixedValueParameter<IntValue> IterationsParameter {
    5155      get { return (IFixedValueParameter<IntValue>)Parameters[IterationsParameterName]; }
     56    }
     57
     58    public IFixedValueParameter<BoolValue> SetSeedRandomlyParameter {
     59      get { return (IFixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; }
     60    }
     61
     62    public IFixedValueParameter<IntValue> SeedParameter {
     63      get { return (IFixedValueParameter<IntValue>)Parameters[SeedParameterName]; }
     64    }
     65
     66    public IFixedValueParameter<IntValue> RestartsParameter {
     67      get { return (IFixedValueParameter<IntValue>)Parameters[RestartsParameterName]; }
    5268    }
    5369
     
    6278    }
    6379
     80    public int Restarts {
     81      get { return RestartsParameter.Value.Value; }
     82      set { RestartsParameter.Value.Value = value; }
     83    }
     84
     85    public int Seed {
     86      get { return SeedParameter.Value.Value; }
     87      set { SeedParameter.Value.Value = value; }
     88    }
     89
     90    public bool SetSeedRandomly {
     91      get { return SetSeedRandomlyParameter.Value.Value; }
     92      set { SetSeedRandomlyParameter.Value.Value = value; }
     93    }
    6494
    6595    [StorableConstructor]
     
    73103      Parameters.Add(new FixedValueParameter<StringValue>(ModelStructureParameterName, "The function for which the parameters must be fit (only numeric constants are tuned).", new StringValue("1.0 * x*x + 0.0")));
    74104      Parameters.Add(new FixedValueParameter<IntValue>(IterationsParameterName, "The maximum number of iterations for constants optimization.", new IntValue(200)));
    75     }
     105      Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of independent random restarts", new IntValue(10)));
     106      Parameters.Add(new FixedValueParameter<IntValue>(SeedParameterName, "The PRNG seed value.", new IntValue()));
     107      Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyParameterName, "Switch to determine if the random number seed should be initialized randomly.", new BoolValue(true)));
     108    }
     109
    76110    [StorableHook(HookType.AfterDeserialization)]
    77     private void AfterDeserialization() { }
     111    private void AfterDeserialization() {
     112      // BackwardsCompatibility3.3
     113      #region Backwards compatible code, remove with 3.4
     114      if (!Parameters.ContainsKey(RestartsParameterName))
     115        Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of independent random restarts", new IntValue(1)));
     116      if (!Parameters.ContainsKey(SeedParameterName))
     117        Parameters.Add(new FixedValueParameter<IntValue>(SeedParameterName, "The PRNG seed value.", new IntValue()));
     118      if (!Parameters.ContainsKey(SetSeedRandomlyParameterName))
     119        Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyParameterName, "Switch to determine if the random number seed should be initialized randomly.", new BoolValue(true)));
     120      #endregion
     121    }
    78122
    79123    public override IDeepCloneable Clone(Cloner cloner) {
     
    83127    #region nonlinear regression
    84128    protected override void Run() {
    85       var solution = CreateRegressionSolution(Problem.ProblemData, ModelStructure, Iterations);
    86       Results.Add(new Result(RegressionSolutionResultName, "The nonlinear regression solution.", solution));
    87       Results.Add(new Result("Root mean square error (train)", "The root of the mean of squared errors of the regression solution on the training set.", new DoubleValue(solution.TrainingRootMeanSquaredError)));
    88       Results.Add(new Result("Root mean square error (test)", "The root of the mean of squared errors of the regression solution on the test set.", new DoubleValue(solution.TestRootMeanSquaredError)));
    89     }
    90 
    91     public static ISymbolicRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData, string modelStructure, int maxIterations) {
     129      if (SetSeedRandomly) Seed = (new System.Random()).Next();
     130      var rand = new MersenneTwister((uint)Seed);
     131      IRegressionSolution bestSolution = null;
     132      for (int r = 0; r < Restarts; r++) {
     133        var solution = CreateRegressionSolution(Problem.ProblemData, ModelStructure, Iterations, rand);
     134        if (bestSolution == null || solution.TrainingRootMeanSquaredError < bestSolution.TrainingRootMeanSquaredError) {
     135          bestSolution = solution;
     136        }
     137      }
     138
     139      Results.Add(new Result(RegressionSolutionResultName, "The nonlinear regression solution.", bestSolution));
     140      Results.Add(new Result("Root mean square error (train)", "The root of the mean of squared errors of the regression solution on the training set.", new DoubleValue(bestSolution.TrainingRootMeanSquaredError)));
     141      Results.Add(new Result("Root mean square error (test)", "The root of the mean of squared errors of the regression solution on the test set.", new DoubleValue(bestSolution.TestRootMeanSquaredError)));
     142
     143    }
     144
     145    /// <summary>
     146    /// Fits a model to the data by optimizing the numeric constants.
     147    /// Model is specified as infix expression containing variable names and numbers.
     148    /// The starting point for the numeric constants is initialized randomly if a random number generator is specified (~N(0,1)). Otherwise the user specified constants are
     149    /// used as a starting point.
     150    /// </summary>
     151    /// <param name="problemData">Training and test data</param>
     152    /// <param name="modelStructure">The function as infix expression</param>
     153    /// <param name="maxIterations">Number of constant optimization iterations (using Levenberg-Marquardt algorithm)</param>
     154    /// <param name="random">Optional random number generator for random initialization of numeric constants.</param>
     155    /// <returns></returns>
     156    public static ISymbolicRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData, string modelStructure, int maxIterations, IRandom random = null) {
    92157      var parser = new InfixExpressionParser();
    93158      var tree = parser.Parse(modelStructure);
     
    117182      if (!SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(tree)) throw new ArgumentException("The optimizer does not support the specified model structure.");
    118183
     184      // initialize constants randomly
     185      if (random != null) {
     186        foreach (var node in tree.IterateNodesPrefix().OfType<ConstantTreeNode>()) {
     187          node.Value = NormalDistributedRandom.NextDouble(random, 0, 1);
     188        }
     189      }
    119190      var interpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
     191
    120192      SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, tree, problemData, problemData.TrainingIndices,
    121193        applyLinearScaling: false, maxIterations: maxIterations,
    122194        updateVariableWeights: false, updateConstantsInTree: true);
    123 
    124195
    125196      var scaledModel = new SymbolicRegressionModel(problemData.TargetVariable, tree, (ISymbolicDataAnalysisExpressionTreeInterpreter)interpreter.Clone());
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4

    • Property svn:ignore
      •  

        old new  
        11ComparisonFilterView.resx
        22FilterView.resx
         3*.user
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs

    r14185 r14277  
    4949      this.label1 = new System.Windows.Forms.Label();
    5050      this.classifierComboBox = new System.Windows.Forms.ComboBox();
     51      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     52      this.splitContainer.Panel1.SuspendLayout();
     53      this.splitContainer.SuspendLayout();
    5154      this.optionsBox.SuspendLayout();
    5255      this.SuspendLayout();
    5356      //
     57      // splitContainer
     58      //
     59      //
     60      // splitContainer.Panel1
     61      //
     62      this.splitContainer.Panel1.Controls.Add(this.optionsBox);
     63      //
    5464      // optionsBox
    5565      //
    56       this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     66      this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     67            | System.Windows.Forms.AnchorStyles.Right)));
    5768      this.optionsBox.Controls.Add(this.displayDetailsCheckBox);
    5869      this.optionsBox.Controls.Add(this.label1);
    5970      this.optionsBox.Controls.Add(this.classifierComboBox);
    60       this.optionsBox.Location = new System.Drawing.Point(5, 324);
    61       this.optionsBox.Margin = new System.Windows.Forms.Padding(4);
     71      this.optionsBox.Location = new System.Drawing.Point(4, 262);
    6272      this.optionsBox.Name = "optionsBox";
    63       this.optionsBox.Padding = new System.Windows.Forms.Padding(4);
    64       this.optionsBox.Size = new System.Drawing.Size(203, 165);
     73      this.optionsBox.Size = new System.Drawing.Size(84, 138);
    6574      this.optionsBox.TabIndex = 7;
    6675      this.optionsBox.TabStop = false;
     
    7079      //
    7180      this.displayDetailsCheckBox.AutoSize = true;
    72       this.displayDetailsCheckBox.Location = new System.Drawing.Point(7, 71);
     81      this.displayDetailsCheckBox.Location = new System.Drawing.Point(5, 58);
     82      this.displayDetailsCheckBox.Margin = new System.Windows.Forms.Padding(2);
    7383      this.displayDetailsCheckBox.Name = "displayDetailsCheckBox";
    7484      this.displayDetailsCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
    75       this.displayDetailsCheckBox.Size = new System.Drawing.Size(153, 21);
     85      this.displayDetailsCheckBox.Size = new System.Drawing.Size(119, 17);
    7686      this.displayDetailsCheckBox.TabIndex = 3;
    7787      this.displayDetailsCheckBox.Text = "Display value count";
     
    8292      //
    8393      this.label1.AutoSize = true;
    84       this.label1.Location = new System.Drawing.Point(4, 19);
    85       this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
     94      this.label1.Location = new System.Drawing.Point(3, 15);
    8695      this.label1.Name = "label1";
    87       this.label1.Size = new System.Drawing.Size(108, 17);
     96      this.label1.Size = new System.Drawing.Size(81, 13);
    8897      this.label1.TabIndex = 2;
    8998      this.label1.Text = "Target variable:";
     
    91100      // classifierComboBox
    92101      //
     102      this.classifierComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     103            | System.Windows.Forms.AnchorStyles.Right)));
    93104      this.classifierComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    94105      this.classifierComboBox.FormattingEnabled = true;
    95       this.classifierComboBox.Location = new System.Drawing.Point(7, 40);
    96       this.classifierComboBox.Margin = new System.Windows.Forms.Padding(4);
     106      this.classifierComboBox.Location = new System.Drawing.Point(5, 32);
    97107      this.classifierComboBox.Name = "classifierComboBox";
    98       this.classifierComboBox.Size = new System.Drawing.Size(160, 24);
     108      this.classifierComboBox.Size = new System.Drawing.Size(73, 21);
    99109      this.classifierComboBox.TabIndex = 1;
    100110      this.classifierComboBox.SelectedIndexChanged += new System.EventHandler(this.classifierComboBox_SelectedIndexChanged);
     
    102112      // HistogramView
    103113      //
    104       this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     114      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    105115      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    106       this.Controls.Add(this.optionsBox);
    107       this.Margin = new System.Windows.Forms.Padding(5);
     116      this.Margin = new System.Windows.Forms.Padding(4);
    108117      this.Name = "HistogramView";
    109       this.Controls.SetChildIndex(this.optionsBox, 0);
     118      this.splitContainer.Panel1.ResumeLayout(false);
     119      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     120      this.splitContainer.ResumeLayout(false);
    110121      this.optionsBox.ResumeLayout(false);
    111122      this.optionsBox.PerformLayout();
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs

    r14185 r14277  
    4747      this.optionsBox = new System.Windows.Forms.GroupBox();
    4848      this.allInOneCheckBox = new System.Windows.Forms.CheckBox();
     49      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     50      this.splitContainer.Panel1.SuspendLayout();
     51      this.splitContainer.SuspendLayout();
    4952      this.optionsBox.SuspendLayout();
    5053      this.SuspendLayout();
    5154      //
     55      // splitContainer
     56      //
     57      //
     58      // splitContainer.Panel1
     59      //
     60      this.splitContainer.Panel1.Controls.Add(this.optionsBox);
     61      //
    5262      // optionsBox
    5363      //
    54       this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     64      this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     65            | System.Windows.Forms.AnchorStyles.Right)));
    5566      this.optionsBox.Controls.Add(this.allInOneCheckBox);
    5667      this.optionsBox.Location = new System.Drawing.Point(4, 262);
    5768      this.optionsBox.Name = "optionsBox";
    58       this.optionsBox.Size = new System.Drawing.Size(151, 134);
     69      this.optionsBox.Size = new System.Drawing.Size(84, 138);
    5970      this.optionsBox.TabIndex = 7;
    6071      this.optionsBox.TabStop = false;
     
    7889      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7990      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    80       this.Controls.Add(this.optionsBox);
    8191      this.Name = "LineChartView";
    82       this.Controls.SetChildIndex(this.optionsBox, 0);
     92      this.splitContainer.Panel1.ResumeLayout(false);
     93      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     94      this.splitContainer.ResumeLayout(false);
    8395      this.optionsBox.ResumeLayout(false);
    8496      this.optionsBox.PerformLayout();
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs

    r14185 r14277  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.dataTableView = new DataPreprocessing.Views.PreprocessingDataTableView();
    4847      this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
     48      this.dataTableView = new HeuristicLab.DataPreprocessing.Views.PreprocessingDataTableView();
     49      this.splitContainer = new System.Windows.Forms.SplitContainer();
    4950      this.checkedItemList = new HeuristicLab.DataPreprocessing.Views.PreprocessingCheckedItemListView();
    5051      this.tableLayoutPanel.SuspendLayout();
     52      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     53      this.splitContainer.Panel1.SuspendLayout();
     54      this.splitContainer.Panel2.SuspendLayout();
     55      this.splitContainer.SuspendLayout();
    5156      this.SuspendLayout();
     57      //
     58      // tableLayoutPanel
     59      //
     60      this.tableLayoutPanel.ColumnCount = 1;
     61      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
     62      this.tableLayoutPanel.Controls.Add(this.dataTableView, 0, 0);
     63      this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
     64      this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
     65      this.tableLayoutPanel.Name = "tableLayoutPanel";
     66      this.tableLayoutPanel.RowCount = 1;
     67      this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
     68      this.tableLayoutPanel.Size = new System.Drawing.Size(559, 403);
     69      this.tableLayoutPanel.TabIndex = 6;
     70      this.tableLayoutPanel.Layout += new System.Windows.Forms.LayoutEventHandler(this.tableLayoutPanel_Layout);
    5271      //
    5372      // dataTableView
    5473      //
     74      this.dataTableView.AutoScroll = true;
    5575      this.dataTableView.Caption = "DataTable View";
     76      this.dataTableView.Classification = null;
    5677      this.dataTableView.Content = null;
    5778      this.dataTableView.Dock = System.Windows.Forms.DockStyle.Fill;
     79      this.dataTableView.IsDetailedChartViewEnabled = false;
    5880      this.dataTableView.Location = new System.Drawing.Point(3, 3);
    5981      this.dataTableView.Name = "dataTableView";
    6082      this.dataTableView.ReadOnly = false;
    61       this.dataTableView.Size = new System.Drawing.Size(486, 390);
     83      this.dataTableView.Size = new System.Drawing.Size(553, 397);
    6284      this.dataTableView.TabIndex = 0;
    6385      //
    64       // tableLayoutPanel
     86      // splitContainer
    6587      //
    66       this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    67             | System.Windows.Forms.AnchorStyles.Left)
    68             | System.Windows.Forms.AnchorStyles.Right)));
    69       this.tableLayoutPanel.AutoScroll = true;
    70       this.tableLayoutPanel.ColumnCount = 1;
    71       this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
    72       this.tableLayoutPanel.Controls.Add(this.dataTableView, 0, 0);
    73       this.tableLayoutPanel.Location = new System.Drawing.Point(162, 4);
    74       this.tableLayoutPanel.Name = "tableLayoutPanel";
    75       this.tableLayoutPanel.RowCount = 1;
    76       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
    77       this.tableLayoutPanel.Size = new System.Drawing.Size(492, 396);
    78       this.tableLayoutPanel.TabIndex = 6;
    79       this.tableLayoutPanel.Layout += new System.Windows.Forms.LayoutEventHandler(this.tableLayoutPanel_Layout);
     88      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     89      this.splitContainer.Location = new System.Drawing.Point(0, 0);
     90      this.splitContainer.Name = "splitContainer";
     91      //
     92      // splitContainer.Panel1
     93      //
     94      this.splitContainer.Panel1.Controls.Add(this.checkedItemList);
     95      //
     96      // splitContainer.Panel2
     97      //
     98      this.splitContainer.Panel2.Controls.Add(this.tableLayoutPanel);
     99      this.splitContainer.Size = new System.Drawing.Size(654, 403);
     100      this.splitContainer.SplitterDistance = 91;
     101      this.splitContainer.TabIndex = 7;
    80102      //
    81103      // checkedItemList
    82104      //
    83       this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    84             | System.Windows.Forms.AnchorStyles.Left)));
     105      this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     106            | System.Windows.Forms.AnchorStyles.Left)
     107            | System.Windows.Forms.AnchorStyles.Right)));
    85108      this.checkedItemList.Caption = "View";
    86109      this.checkedItemList.Content = null;
     
    88111      this.checkedItemList.Name = "checkedItemList";
    89112      this.checkedItemList.ReadOnly = false;
    90       this.checkedItemList.Size = new System.Drawing.Size(152, 252);
     113      this.checkedItemList.Size = new System.Drawing.Size(84, 252);
    91114      this.checkedItemList.TabIndex = 4;
    92115      //
     
    95118      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    96119      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    97       this.Controls.Add(this.tableLayoutPanel);
    98       this.Controls.Add(this.checkedItemList);
     120      this.Controls.Add(this.splitContainer);
    99121      this.Name = "PreprocessingChartView";
    100122      this.Size = new System.Drawing.Size(654, 403);
    101123      this.tableLayoutPanel.ResumeLayout(false);
     124      this.splitContainer.Panel1.ResumeLayout(false);
     125      this.splitContainer.Panel2.ResumeLayout(false);
     126      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     127      this.splitContainer.ResumeLayout(false);
    102128      this.ResumeLayout(false);
    103129
     
    109135    private DataPreprocessing.Views.PreprocessingDataTableView dataTableView;
    110136    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
     137    protected System.Windows.Forms.SplitContainer splitContainer;
    111138  }
    112139}
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs

    r14185 r14277  
    5959    //Add or remove data row
    6060    private void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) {
    61 
     61      tableLayoutPanel.SuspendLayout();
    6262      foreach (IndexedItem<StringValue> item in checkedItems.Items) {
    6363        string variableName = item.Value.Value;
    6464
    65         //variable is displayed -> remove
    66         if (VariableIsDisplayed(variableName)) {
    67           dataTable.Rows.Remove(variableName);
     65        // not checked -> remove
     66        if (!VariableIsChecked(variableName)) {
     67          dataTableView.SetRowEnabled(variableName, false);
    6868          dataTable.SelectedRows.Remove(variableName);
    6969          dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
    70           //variable isnt't displayed -> add
    7170        } else {
    7271          DataRow row = GetDataRow(variableName);
    7372          DataRow selectedRow = GetSelectedDataRow(variableName);
    74           dataTable.Rows.Add(row);
     73          dataTableView.SetRowEnabled(variableName, true);
    7574
    7675          PreprocessingDataTable pdt = new PreprocessingDataTable(variableName);
    7776          pdt.Rows.Add(row);
    78           dataTablePerVariable.Add(pdt);
     77          // dataTablePerVariable does not contain unchecked variables => reduce insert position by number of uncheckt variables to correct the index
     78          int uncheckedUntilVariable = checkedItemList.Content.TakeWhile(x => x.Value != variableName).Count(x => !checkedItemList.Content.ItemChecked(x));
     79          dataTablePerVariable.Insert(item.Index - uncheckedUntilVariable, pdt);
    7980
    8081          //update selection
     
    8990      if (Content != null && !Content.AllInOneMode)
    9091        GenerateChart();
    91 
    92     }
    93 
    94     private bool VariableIsDisplayed(string name) {
    95 
    96       foreach (var item in dataTable.Rows) {
    97         if (item.Name == name)
    98           return true;
    99       }
    100       return false;
     92      tableLayoutPanel.ResumeLayout(true);
     93    }
     94
     95    private bool VariableIsChecked(string name) {
     96      return Content.VariableItemList.CheckedItems.Any(x => x.Value.Value == name);
    10197    }
    10298
     
    158154      dataTable.SelectedRows.Clear();
    159155      foreach (var selectedRow in selectedDataRows) {
    160         if (VariableIsDisplayed(selectedRow.Name))
     156        if (VariableIsChecked(selectedRow.Name))
    161157          dataTable.SelectedRows.Add(selectedRow);
    162158      }
  • branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs

    r14185 r14277  
    139139        }
    140140      } else MessageBox.Show("Nothing to configure.");
     141    }
     142
     143    public bool IsRowEnabled(string name) {
     144      return chart.Series.FindByName(name) != null && chart.Series[name].Enabled;
     145    }
     146    public void SetRowEnabled(string name, bool enabled) {
     147      if (chart.Series.FindByName(name) != null)
     148        chart.Series[name].Enabled = enabled;
    141149    }
    142150
  • branches/symbreg-factors-2650/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Datatypes.cs

    r14276 r14277  
    4949  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
    5050  internal class igraph_matrix_t {
    51     igraph_vector_t data = new igraph_vector_t();
     51    internal igraph_vector_t data = new igraph_vector_t();
    5252    internal int nrow;
    5353    internal int ncol;
     
    128128  #endregion
    129129
     130  #region Delegates
     131  [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
     132  internal delegate bool igraph_bfshandler_t(igraph_t graph, int vid, int pred, int succ, int rank, int dist, IntPtr extra);
     133
     134  [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
     135  internal delegate bool igraph_dfshandler_t(igraph_t graph, int vid, int dist, IntPtr extra);
     136  #endregion
     137
    130138  #region Enums
    131139  internal enum igraph_layout_grid_t {
  • branches/symbreg-factors-2650/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/DllImporter.cs

    r14276 r14277  
    8787      arpackoptions.nev = 1;
    8888      arpackoptions.ishift = 1;
    89       arpackoptions.mxiter = 3000;
     89      arpackoptions.mxiter = 1000;
    9090      arpackoptions.nb = 1;
    9191      arpackoptions.mode = 1;
     
    109109    internal static int igraph_add_edge(igraph_t graph, int from, int to) {
    110110      return X86 ? igraph_add_edge_x86(graph, from, to) : igraph_add_edge_x64(graph, from, to);
     111    }
     112    #endregion
     113
     114    #region igraph visits
     115    internal static int igraph_bfs(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, igraph_vector_t order, igraph_vector_t rank, igraph_vector_t father, igraph_vector_t pred, igraph_vector_t succ, igraph_vector_t dist, igraph_bfshandler_t callback, object tag) {
     116      return MarshalIfExistsAndCall(tag, ptr => X86 ? igraph_bfs_x86(graph, root, roots, mode, unreachable, restricted, order, rank, father, pred, succ, dist, callback, ptr) : igraph_bfs_x64(graph, root, roots, mode, unreachable, restricted, order, rank, father, pred, succ, dist, callback, ptr));
     117    }
     118    internal static int igraph_dfs(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, igraph_vector_t order, igraph_vector_t order_out, igraph_vector_t father, igraph_vector_t dist, igraph_dfshandler_t inWrapper, igraph_dfshandler_t outWrapper, object tag) {
     119      return MarshalIfExistsAndCall(tag, ptr => X86 ? igraph_dfs_x86(graph, root, mode, unreachable, order, order_out, father, dist, inWrapper, outWrapper, ptr) : igraph_dfs_x64(graph, root, mode, unreachable, order, order_out, father, dist, inWrapper, outWrapper, ptr));
    111120    }
    112121    #endregion
     
    137146    [DllImport(X64Dll, EntryPoint = "igraph_pagerank", CallingConvention = CallingConvention.Cdecl)]
    138147    private static extern int igraph_pagerank_x64(igraph_t graph, igraph_pagerank_algo_t algo, [In, Out]igraph_vector_t vector, ref double value, igraph_vs_t vids, bool directed, double damping, igraph_vector_t weights, IntPtr options);
     148    [DllImport(X86Dll, EntryPoint = "igraph_bfs", CallingConvention = CallingConvention.Cdecl)]
     149    private static extern int igraph_bfs_x86(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t rank, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t pred, [In, Out]igraph_vector_t succ, [In, Out]igraph_vector_t dist, igraph_bfshandler_t callback, IntPtr extra);
     150    [DllImport(X64Dll, EntryPoint = "igraph_bfs", CallingConvention = CallingConvention.Cdecl)]
     151    private static extern int igraph_bfs_x64(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t rank, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t pred, [In, Out]igraph_vector_t succ, [In, Out]igraph_vector_t dist, igraph_bfshandler_t callback, IntPtr extra);
     152    [DllImport(X86Dll, EntryPoint = "igraph_dfs", CallingConvention = CallingConvention.Cdecl)]
     153    private static extern int igraph_dfs_x86(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t order_out, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t dist, igraph_dfshandler_t in_callback, igraph_dfshandler_t out_callback, IntPtr extra);
     154    [DllImport(X64Dll, EntryPoint = "igraph_dfs", CallingConvention = CallingConvention.Cdecl)]
     155    private static extern int igraph_dfs_x64(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t order_out, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t dist, igraph_dfshandler_t in_callback, igraph_dfshandler_t out_callback, IntPtr extra);
    139156    #endregion
    140157    #endregion
     
    168185      return X86 ? igraph_vector_init_x86(vector, length) : igraph_vector_init_x64(vector, length);
    169186    }
     187    internal static int igraph_vector_init_copy(igraph_vector_t vector, double[] vec) {
     188      return X86 ? igraph_vector_init_copy_x86(vector, vec, vec.Length) : igraph_vector_init_copy_x64(vector, vec, vec.Length);
     189    }
    170190    internal static void igraph_vector_destroy(igraph_vector_t vector) {
    171191      if (X86) igraph_vector_destroy_x86(vector);
     
    175195      return X86 ? igraph_vector_copy_x86(to, from) : igraph_vector_copy_x64(to, from);
    176196    }
     197    internal static double[] igraph_vector_to_array(igraph_vector_t from) {
     198      var len = igraph_vector_size(from);
     199      var result = new double[len];
     200      if (X86) igraph_vector_copy_to_x86(from, result);
     201      else igraph_vector_copy_to_x64(from, result);
     202      return result;
     203    }
    177204
    178205    internal static int igraph_vector_size(igraph_vector_t vector) {
     
    187214      if (X86) igraph_vector_set_x86(vector, index, value);
    188215      else igraph_vector_set_x64(vector, index, value);
     216    }
     217    internal static void igraph_vector_fill(igraph_vector_t vector, double v) {
     218      if (X86) igraph_vector_fill_x86(vector, v);
     219      else igraph_vector_fill_x64(vector, v);
     220    }
     221    internal static void igraph_vector_scale(igraph_vector_t vector, double by) {
     222      if (X86) igraph_vector_scale_x86(vector, by);
     223      else igraph_vector_scale_x64(vector, by);
     224    }
     225
     226    internal static int igraph_vector_reverse(igraph_vector_t vector) {
     227      return X86 ? igraph_vector_reverse_x86(vector) : igraph_vector_reverse_x64(vector);
     228    }
     229    internal static int igraph_vector_shuffle(igraph_vector_t vector) {
     230      return X86 ? igraph_vector_shuffle_x86(vector) : igraph_vector_shuffle_x64(vector);
    189231    }
    190232
     
    194236    [DllImport(X64Dll, EntryPoint = "igraph_vector_init", CallingConvention = CallingConvention.Cdecl)]
    195237    private static extern int igraph_vector_init_x64([In, Out]igraph_vector_t vector, int length);
     238    [DllImport(X86Dll, EntryPoint = "igraph_vector_init_copy", CallingConvention = CallingConvention.Cdecl)]
     239    private static extern int igraph_vector_init_copy_x86([In, Out]igraph_vector_t vector, double[] vec, int length);
     240    [DllImport(X64Dll, EntryPoint = "igraph_vector_init_copy", CallingConvention = CallingConvention.Cdecl)]
     241    private static extern int igraph_vector_init_copy_x64([In, Out]igraph_vector_t vector, double[] vec, int length);
    196242    [DllImport(X86Dll, EntryPoint = "igraph_vector_destroy", CallingConvention = CallingConvention.Cdecl)]
    197243    private static extern void igraph_vector_destroy_x86([In, Out]igraph_vector_t vector);
     
    214260    [DllImport(X64Dll, EntryPoint = "igraph_vector_copy", CallingConvention = CallingConvention.Cdecl)]
    215261    private static extern int igraph_vector_copy_x64([In, Out]igraph_vector_t to, igraph_vector_t from);
     262    [DllImport(X86Dll, EntryPoint = "igraph_vector_copy_to", CallingConvention = CallingConvention.Cdecl)]
     263    private static extern void igraph_vector_copy_to_x86(igraph_vector_t from, [In, Out]double[] to);
     264    [DllImport(X64Dll, EntryPoint = "igraph_vector_copy_to", CallingConvention = CallingConvention.Cdecl)]
     265    private static extern void igraph_vector_copy_to_x64(igraph_vector_t from, [In, Out]double[] to);
     266    [DllImport(X86Dll, EntryPoint = "igraph_vector_fill", CallingConvention = CallingConvention.Cdecl)]
     267    private static extern int igraph_vector_fill_x86([In, Out]igraph_vector_t vector, double v);
     268    [DllImport(X64Dll, EntryPoint = "igraph_vector_fill", CallingConvention = CallingConvention.Cdecl)]
     269    private static extern int igraph_vector_fill_x64([In, Out]igraph_vector_t vector, double v);
     270    [DllImport(X86Dll, EntryPoint = "igraph_vector_reverse", CallingConvention = CallingConvention.Cdecl)]
     271    private static extern int igraph_vector_reverse_x86([In, Out]igraph_vector_t vector);
     272    [DllImport(X64Dll, EntryPoint = "igraph_vector_reverse", CallingConvention = CallingConvention.Cdecl)]
     273    private static extern int igraph_vector_reverse_x64([In, Out]igraph_vector_t vector);
     274    [DllImport(X86Dll, EntryPoint = "igraph_vector_shuffle", CallingConvention = CallingConvention.Cdecl)]
     275    private static extern int igraph_vector_shuffle_x86([In, Out]igraph_vector_t vector);
     276    [DllImport(X64Dll, EntryPoint = "igraph_vector_shuffle", CallingConvention = CallingConvention.Cdecl)]
     277    private static extern int igraph_vector_shuffle_x64([In, Out]igraph_vector_t vector);
     278    [DllImport(X86Dll, EntryPoint = "igraph_vector_scale", CallingConvention = CallingConvention.Cdecl)]
     279    private static extern void igraph_vector_scale_x86([In, Out]igraph_vector_t vector, double by);
     280    [DllImport(X64Dll, EntryPoint = "igraph_vector_scale", CallingConvention = CallingConvention.Cdecl)]
     281    private static extern void igraph_vector_scale_x64([In, Out]igraph_vector_t vector, double by);
    216282    #endregion
    217283    #endregion
     
    236302      if (X86) igraph_matrix_set_x86(matrix, row, col, value);
    237303      else igraph_matrix_set_x64(matrix, row, col, value);
     304    }
     305
     306    internal static void igraph_matrix_fill(igraph_matrix_t matrix, double v) {
     307      if (X86) igraph_matrix_fill_x86(matrix, v);
     308      else igraph_matrix_fill_x64(matrix, v);
     309    }
     310
     311    internal static int igraph_matrix_transpose(igraph_matrix_t matrix) {
     312      return X86 ? igraph_matrix_transpose_x86(matrix) : igraph_matrix_transpose_x64(matrix);
     313    }
     314
     315    internal static void igraph_matrix_scale(igraph_matrix_t matrix, double by) {
     316      if (X86) igraph_matrix_scale_x86(matrix, by);
     317      else igraph_matrix_scale_x64(matrix, by);
    238318    }
    239319
     
    259339    [DllImport(X64Dll, EntryPoint = "igraph_matrix_copy", CallingConvention = CallingConvention.Cdecl)]
    260340    private static extern int igraph_matrix_copy_x64([In, Out]igraph_matrix_t to, igraph_matrix_t from);
     341    [DllImport(X86Dll, EntryPoint = "igraph_matrix_fill", CallingConvention = CallingConvention.Cdecl)]
     342    private static extern void igraph_matrix_fill_x86([In, Out]igraph_matrix_t matrix, double v);
     343    [DllImport(X64Dll, EntryPoint = "igraph_matrix_fill", CallingConvention = CallingConvention.Cdecl)]
     344    private static extern void igraph_matrix_fill_x64([In, Out]igraph_matrix_t matrix, double v);
     345    [DllImport(X86Dll, EntryPoint = "igraph_matrix_transpose", CallingConvention = CallingConvention.Cdecl)]
     346    private static extern int igraph_matrix_transpose_x86([In, Out]igraph_matrix_t matrix);
     347    [DllImport(X64Dll, EntryPoint = "igraph_matrix_transpose", CallingConvention = CallingConvention.Cdecl)]
     348    private static extern int igraph_matrix_transpose_x64([In, Out]igraph_matrix_t matrix);
     349    [DllImport(X86Dll, EntryPoint = "igraph_matrix_scale", CallingConvention = CallingConvention.Cdecl)]
     350    private static extern int igraph_matrix_scale_x86([In, Out]igraph_matrix_t matrix, double by);
     351    [DllImport(X64Dll, EntryPoint = "igraph_matrix_scale", CallingConvention = CallingConvention.Cdecl)]
     352    private static extern int igraph_matrix_scale_x64([In, Out]igraph_matrix_t matrix, double by);
    261353    #endregion
    262354    #endregion
     
    271363    internal static int igraph_layout_davidson_harel(igraph_t graph, igraph_matrix_t res, bool use_seed, int maxiter, int fineiter, double cool_fact, double weight_node_dist, double weight_border, double weight_edge_lengths, double weight_edge_crossings, double weight_node_edge_dist) {
    272364      return X86 ? igraph_layout_davidson_harel_x86(graph, res, use_seed, maxiter, fineiter, cool_fact, weight_node_dist, weight_border, weight_edge_lengths, weight_edge_crossings, weight_node_edge_dist) : igraph_layout_davidson_harel_x64(graph, res, use_seed, maxiter, fineiter, cool_fact, weight_node_dist, weight_border, weight_edge_lengths, weight_edge_crossings, weight_node_edge_dist);
     365    }
     366    internal static int igraph_layout_mds(igraph_t graph, igraph_matrix_t res, igraph_matrix_t dist = null, int dim = 2) {
     367      return MarshalIfExistsAndCall(GetDefaultArpackOptions(), ptr => X86 ? igraph_layout_mds_x86(graph, res, dist, dim, ptr) : igraph_layout_mds_x64(graph, res, dist, dim, ptr));
    273368    }
    274369
     
    286381    [DllImport(X64Dll, EntryPoint = "igraph_layout_davidson_harel", CallingConvention = CallingConvention.Cdecl)]
    287382    private static extern int igraph_layout_davidson_harel_x64(igraph_t graph, [In, Out]igraph_matrix_t res, bool use_seed, int maxiter, int fineiter, double cool_fact, double weight_node_dist, double weight_border, double weight_edge_lengths, double weight_edge_crossings, double weight_node_edge_dist);
     383    [DllImport(X86Dll, EntryPoint = "igraph_layout_mds", CallingConvention = CallingConvention.Cdecl)]
     384    private static extern int igraph_layout_mds_x86(igraph_t graph, [In, Out]igraph_matrix_t res, igraph_matrix_t dist, int dim, IntPtr options);
     385    [DllImport(X64Dll, EntryPoint = "igraph_layout_mds", CallingConvention = CallingConvention.Cdecl)]
     386    private static extern int igraph_layout_mds_x64(igraph_t graph, [In, Out]igraph_matrix_t res, igraph_matrix_t dist, int dim, IntPtr options);
    288387    #endregion
    289388    #endregion
     
    309408    #endregion
    310409    #endregion
     410
     411    private static int MarshalIfExistsAndCall(object o, Func<IntPtr, int> call) {
     412      var ptr = IntPtr.Zero;
     413      if (o != null) {
     414        try {
     415          ptr = Marshal.AllocHGlobal(Marshal.SizeOf(o));
     416        } catch (OutOfMemoryException e) { throw new InvalidOperationException("Not enough memory to perform operation.", e); }
     417        Marshal.StructureToPtr(o, ptr, false);
     418      }
     419      try {
     420        return call(ptr);
     421      } finally {
     422        if (o != null) {
     423          Marshal.DestroyStructure(ptr, o.GetType());
     424          Marshal.FreeHGlobal(ptr);
     425        }
     426      }
     427    }
     428
     429    private static void MarshalIfExistsAndCall(object o, Action<IntPtr> call) {
     430      var ptr = IntPtr.Zero;
     431      if (o != null) {
     432        try {
     433          ptr = Marshal.AllocHGlobal(Marshal.SizeOf(o));
     434        } catch (OutOfMemoryException e) { throw new InvalidOperationException("Not enough memory to perform operation.", e); }
     435        Marshal.StructureToPtr(o, ptr, false);
     436      }
     437      try {
     438        call(ptr);
     439      } finally {
     440        if (o != null) {
     441          Marshal.DestroyStructure(ptr, o.GetType());
     442          Marshal.FreeHGlobal(ptr);
     443        }
     444      }
     445    }
    311446  }
    312447}
  • branches/symbreg-factors-2650/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Graph.cs

    r14276 r14277  
    8686    }
    8787    public Matrix LayoutWithFruchtermanReingold(int niter, double startTemp, Matrix initialCoords = null) {
    88       if (initialCoords != null && (initialCoords.Rows != graph.n || initialCoords.Columns != 2))
     88      if (initialCoords != null && (initialCoords.Rows != Vertices || initialCoords.Columns != 2))
    8989        throw new ArgumentException("Initial coordinate matrix does not contain the required number of rows and columns.", "initialCoords");
    90       var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(graph.n, 2);
     90      var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(Vertices, 2);
    9191      DllImporter.igraph_layout_fruchterman_reingold(graph, coords.NativeInstance, initialCoords != null, niter, startTemp, igraph_layout_grid_t.IGRAPH_LAYOUT_AUTOGRID, null, null, null, null, null);
    9292      return coords;
     
    9797    }
    9898    public Matrix LayoutWithKamadaKawai(int maxiter, double epsilon, double kkconst, Matrix initialCoords = null) {
    99       if (initialCoords != null && (initialCoords.Rows != graph.n || initialCoords.Columns != 2))
     99      if (initialCoords != null && (initialCoords.Rows != Vertices || initialCoords.Columns != 2))
    100100        throw new ArgumentException("Initial coordinate matrix does not contain the required number of rows and columns.", "initialCoords");
    101       var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(graph.n, 2);
     101      var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(Vertices, 2);
    102102      DllImporter.igraph_layout_kamada_kawai(graph, coords.NativeInstance, initialCoords != null, maxiter, epsilon, kkconst, null, null, null, null, null);
    103103      return coords;
     
    109109    }
    110110    public Matrix LayoutWithDavidsonHarel(int maxiter, int fineiter, double cool_fact, double weight_node_dist, double weight_border, double weight_edge_lengths, double weight_edge_crossings, double weight_node_edge_dist, Matrix initialCoords = null) {
    111       if (initialCoords != null && (initialCoords.Rows != graph.n || initialCoords.Columns != 2))
     111      if (initialCoords != null && (initialCoords.Rows != Vertices || initialCoords.Columns != 2))
    112112        throw new ArgumentException("Initial coordinate matrix does not contain the required number of rows and columns.", "initialCoords");
    113       var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(graph.n, 2);
     113      var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(Vertices, 2);
    114114      DllImporter.igraph_layout_davidson_harel(graph, coords.NativeInstance, initialCoords != null, maxiter, fineiter, cool_fact, weight_node_dist, weight_border, weight_edge_lengths, weight_edge_crossings, weight_node_edge_dist);
    115115      return coords;
    116116    }
     117
     118    /// <summary>
     119    /// Use multi-dimensional scaling to layout vertices.
     120    /// A distance matrix can be used to specify the distances between the vertices.
     121    /// Otherwise the distances will be calculated by shortest-path-length.
     122    /// </summary>
     123    /// <remarks>
     124    /// For disconnected graphs, dimension must be 2.
     125    /// </remarks>
     126    /// <param name="dist">The distance matrix to layout the vertices.</param>
     127    /// <param name="dim">How many dimensions should be used.</param>
     128    /// <returns>The coordinates matrix of the aligned vertices.</returns>
     129    public Matrix LayoutWithMds(Matrix dist = null, int dim = 2) {
     130      var coords = new Matrix(Vertices, dim);
     131      DllImporter.igraph_layout_mds(graph, coords.NativeInstance, dist != null ? dist.NativeInstance : null, dim);
     132      return coords;
     133    }
     134
     135    public void BreadthFirstWalk(BreadthFirstHandler handler, int root, DirectedWalkMode mode, bool includeUnreachableFromRoot = false, object tag = null) {
     136      igraph_bfshandler_t wrapper = (t, vid, pred, succ, rank, dist, extra) => handler != null && handler(this, vid, pred, succ, rank, dist, tag);
     137      DllImporter.igraph_bfs(graph, root, null, (igraph_neimode_t)mode, includeUnreachableFromRoot, null, null, null, null, null, null, null, wrapper, tag);
     138    }
     139
     140    public void DepthFirstWalk(DepthFirstHandler inHandler, DepthFirstHandler outHandler, int root, DirectedWalkMode mode, bool includeUnreachableFromRoot = false, object tag = null) {
     141      igraph_dfshandler_t inWrapper = (t, vid, dist, extra) => inHandler != null && inHandler(this, vid, dist, tag);
     142      igraph_dfshandler_t outWrapper = (t, vid, dist, extra) => outHandler != null && outHandler(this, vid, dist, tag);
     143      DllImporter.igraph_dfs(graph, root, (igraph_neimode_t)mode, includeUnreachableFromRoot, null, null, null, null, inWrapper, outWrapper, tag);
     144    }
    117145  }
    118146}
  • branches/symbreg-factors-2650/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Matrix.cs

    r14276 r14277  
    3939      DllImporter.igraph_matrix_copy(matrix, other.NativeInstance);
    4040    }
     41    public Matrix(double[,] mat) {
     42      if (mat == null) throw new ArgumentNullException("mat");
     43      matrix = new igraph_matrix_t();
     44      var nrows = mat.GetLength(0);
     45      var ncols = mat.GetLength(1);
     46      DllImporter.igraph_matrix_init(matrix, nrows, ncols);
     47      var colwise = new double[ncols * nrows];
     48      for (var j = 0; j < ncols; j++)
     49        for (var i = 0; i < nrows; i++)
     50          colwise[j * nrows + i] = mat[i, j];
     51      DllImporter.igraph_vector_init_copy(matrix.data, colwise);
     52    }
    4153    ~Matrix() {
    4254      DllImporter.igraph_matrix_destroy(matrix);
     
    4860      matrix = null;
    4961      GC.SuppressFinalize(this);
     62    }
     63
     64    public void Fill(double v) {
     65      DllImporter.igraph_matrix_fill(matrix, v);
     66    }
     67
     68    public void Transpose() {
     69      DllImporter.igraph_matrix_transpose(matrix);
     70    }
     71
     72    public void Scale(double by) {
     73      DllImporter.igraph_matrix_scale(matrix, by);
    5074    }
    5175
  • branches/symbreg-factors-2650/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Vector.cs

    r14276 r14277  
    2121
    2222using System;
     23using System.Collections.Generic;
     24using System.Linq;
    2325
    2426namespace HeuristicLab.IGraph.Wrappers {
     
    3941      DllImporter.igraph_vector_init(vector, length);
    4042    }
    41 
     43    public Vector(IEnumerable<double> data) {
     44      if (data == null) throw new ArgumentNullException("data");
     45      var vec = data.ToArray();
     46      vector = new igraph_vector_t();
     47      DllImporter.igraph_vector_init_copy(vector, vec);
     48    }
    4249    public Vector(Vector other) {
    4350      if (other == null) throw new ArgumentNullException("other");
     
    4552      DllImporter.igraph_vector_copy(vector, other.NativeInstance);
    4653    }
    47 
    4854    ~Vector() {
    4955      DllImporter.igraph_vector_destroy(vector);
     
    5561      vector = null;
    5662      GC.SuppressFinalize(this);
     63    }
     64
     65    public void Fill(double v) {
     66      DllImporter.igraph_vector_fill(vector, v);
     67    }
     68
     69    public void Reverse() {
     70      DllImporter.igraph_vector_reverse(vector);
     71    }
     72
     73    public void Shuffle() {
     74      DllImporter.igraph_vector_shuffle(vector);
     75    }
     76
     77    public void Scale(double by) {
     78      DllImporter.igraph_vector_scale(vector, by);
    5779    }
    5880
     
    6991
    7092    public double[] ToArray() {
    71       var result = new double[Length];
    72       for (var i = 0; i < result.Length; i++) {
    73         result[i] = DllImporter.igraph_vector_e(vector, i);
    74       }
    75       return result;
     93      return DllImporter.igraph_vector_to_array(vector);
    7694    }
    7795  }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj

    r14178 r14277  
    168168  </ItemGroup>
    169169  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     170  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
     171       Other similar extension points exist, see Microsoft.Common.targets.
     172  <Target Name="BeforeBuild">
     173  </Target>
     174  <Target Name="AfterBuild">
     175  </Target>
     176  -->
    170177  <PropertyGroup>
    171178    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     
    183190</PreBuildEvent>
    184191  </PropertyGroup>
    185   <PropertyGroup>
    186     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    187 set ProjectDir=$(ProjectDir)
    188 set SolutionDir=$(SolutionDir)
    189 set Outdir=$(Outdir)
    190 
    191 call PreBuildEvent.cmd
    192 </PreBuildEvent>
    193   </PropertyGroup>
    194   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    195        Other similar extension points exist, see Microsoft.Common.targets.
    196   <Target Name="BeforeBuild">
    197   </Target>
    198   <Target Name="AfterBuild">
    199   </Target>
    200   -->
    201192</Project>
  • branches/symbreg-factors-2650/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj

    r14178 r14277  
    217217  </ItemGroup>
    218218  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    219   <PropertyGroup>
    220     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    221 set ProjectDir=$(ProjectDir)
    222 set SolutionDir=$(SolutionDir)
    223 set Outdir=$(Outdir)
    224 
    225 call PreBuildEvent.cmd
    226 </PreBuildEvent>
    227   </PropertyGroup>
    228219  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    229220       Other similar extension points exist, see Microsoft.Common.targets.
     
    233224  </Target>
    234225  -->
     226  <PropertyGroup>
     227    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     228set ProjectDir=$(ProjectDir)
     229set SolutionDir=$(SolutionDir)
     230set Outdir=$(Outdir)
     231
     232call PreBuildEvent.cmd
     233</PreBuildEvent>
     234    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     235export ProjectDir=$(ProjectDir)
     236export SolutionDir=$(SolutionDir)
     237
     238$SolutionDir/PreBuildEvent.sh
     239</PreBuildEvent>
     240  </PropertyGroup>
    235241</Project>
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj

    r14241 r14277  
    150150    <Compile Include="SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs">
    151151      <DependentUpon>SymbolicDiscriminantFunctionClassificationSolutionView.cs</DependentUpon>
     152    </Compile>
     153    <Compile Include="SymbolicClassificationModelMathView.cs">
     154      <SubType>UserControl</SubType>
     155    </Compile>
     156    <Compile Include="SymbolicClassificationModelMathView.designer.cs">
     157      <DependentUpon>SymbolicClassificationModelMathView.cs</DependentUpon>
    152158    </Compile>
    153159    <None Include="HeuristicLab.snk" />
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj

    r14125 r14277  
    121121    <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.Designer.cs">
    122122      <DependentUpon>InteractiveSymbolicRegressionSolutionSimplifierView.cs</DependentUpon>
     123    </Compile>
     124    <Compile Include="SymbolicRegressionModelMathView.cs">
     125      <SubType>UserControl</SubType>
     126    </Compile>
     127    <Compile Include="SymbolicRegressionModelMathView.designer.cs">
     128      <DependentUpon>SymbolicRegressionModelMathView.cs</DependentUpon>
    123129    </Compile>
    124130    <Compile Include="Plugin.cs" />
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r12817 r14277  
    121121      <DependentUpon>InteractiveSymbolicExpressionTreeChart.cs</DependentUpon>
    122122    </Compile>
    123     <Compile Include="MathSymbolicDataAnalysisModelView.cs">
    124       <SubType>UserControl</SubType>
    125     </Compile>
    126     <Compile Include="MathSymbolicDataAnalysisModelView.designer.cs">
    127       <DependentUpon>MathSymbolicDataAnalysisModelView.cs</DependentUpon>
     123    <Compile Include="SymbolicDataAnalysisModelMathView.cs">
     124      <SubType>UserControl</SubType>
     125    </Compile>
     126    <Compile Include="SymbolicDataAnalysisModelMathView.designer.cs">
     127      <DependentUpon>SymbolicDataAnalysisModelMathView.cs</DependentUpon>
    128128    </Compile>
    129129    <Compile Include="Plugin.cs" />
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs

    r14259 r14277  
    3737    private int targetCount;
    3838    private int currentLag;
     39    private string targetVariable;
     40    private bool containsTimeSeriesSymbol;
    3941
    4042    [StorableConstructor]
     
    5961
    6062    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
     63      return Format(symbolicExpressionTree, null);
     64    }
     65    public string Format(ISymbolicExpressionTree symbolicExpressionTree, string targetVariable) {
    6166      try {
    6267        StringBuilder strBuilder = new StringBuilder();
    6368        constants.Clear();
    6469        constIndex = 0;
     70        this.targetVariable = targetVariable;
     71        containsTimeSeriesSymbol = symbolicExpressionTree.IterateNodesBreadth().Any(n => IsTimeSeriesSymbol(n.Symbol));
    6572        strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root));
    6673        return strBuilder.ToString();
     
    6875        return ex.Message + Environment.NewLine + ex.StackTrace;
    6976      }
     77    }
     78    static bool IsTimeSeriesSymbol(ISymbol s) {
     79      return s is TimeLag || s is Integral || s is Derivative || s is LaggedVariable;
    7080    }
    7181
     
    227237        strBuilder.Append(invokeNode.Symbol.FunctionName + @" \left( ");
    228238      } else if (node.Symbol is StartSymbol) {
    229         strBuilder.Append("target_" + (targetCount++) + "(t) & = ");
     239        FormatStartSymbol(strBuilder);
    230240      } else if (node.Symbol is Argument) {
    231241        var argSym = node.Symbol as Argument;
     
    337347      } else if (node.Symbol is StartSymbol) {
    338348        strBuilder.Append(@"\\" + Environment.NewLine);
    339         strBuilder.Append("target_" + (targetCount++) + "(t) & = ");
     349        FormatStartSymbol(strBuilder);
    340350      } else if (node.Symbol is Power) {
    341351        strBuilder.Append(@"\right) ^ { \operatorname{round} \left(");
     
    471481    }
    472482
     483    private void FormatStartSymbol(StringBuilder strBuilder) {
     484      strBuilder.Append(targetVariable ?? "target_" + (targetCount++));
     485      if (containsTimeSeriesSymbol)
     486        strBuilder.Append("(t)");
     487      strBuilder.Append(" & = ");
     488    }
     489
    473490    private string LagToString(int lag) {
    474491      if (lag < 0) {
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs

    r14185 r14277  
    7676          dataGridView.RowCount = 1;
    7777          dataGridView.ColumnCount = 1;
     78          dataGridView.TopLeftHeaderCell.Value = string.Empty;
    7879        } else {
    7980          dataGridView.ColumnCount = Content.ProblemData.Classes + 1;
     
    9192          dataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.ColumnHeader);
    9293          dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
     94
     95          dataGridView.TopLeftHeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
     96          dataGridView.TopLeftHeaderCell.Value = Content.Model.TargetVariable;
    9397
    9498          FillDataGridView();
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs

    r14185 r14277  
    120120          IEnumerator<double> classValueEnumerator = Content.ProblemData.ClassValues.OrderBy(x => x).GetEnumerator();
    121121          while (classNameEnumerator.MoveNext() && classValueEnumerator.MoveNext()) {
    122             Series series = new Series(classNameEnumerator.Current);
     122            Series series = new Series(Content.Model.TargetVariable + ": " + classNameEnumerator.Current);
    123123            series.ChartType = SeriesChartType.FastPoint;
    124124            series.Tag = classValueEnumerator.Current;
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/GradientChart.cs

    r14248 r14277  
    284284
    285285      if (ShowCursor)
    286         chart.Titles[0].Text = FreeVariable + " : " + defaultValue.ToString("N3", CultureInfo.CurrentCulture);
     286        chart.Titles[0].Text = FreeVariable + " : " + defaultValue.ToString("G5", CultureInfo.CurrentCulture);
    287287
    288288      ResizeAllSeriesData();
     
    658658
    659659      if (ShowCursor) {
    660         chart.Titles[0].Text = FreeVariable + " : " + x.ToString("N3", CultureInfo.CurrentCulture);
     660        chart.Titles[0].Text = FreeVariable + " : " + x.ToString("G5", CultureInfo.CurrentCulture);
    661661        chart.Update();
    662662      }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ConfidenceRegressionSolutionLineChartView.cs

    r14185 r14277  
    2828using HeuristicLab.Problems.DataAnalysis;
    2929using HeuristicLab.Problems.DataAnalysis.Views;
     30using HeuristicLab.Visualization.ChartControlsExtensions;
    3031
    3132namespace HeuristicLab.Algorithms.DataAnalysis.Views {
     
    109110        // target
    110111        this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
    111         this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable;
     112        this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = TARGETVARIABLE_SERIES_NAME;
    112113        this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    113114        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
     
    126127        var s3Color = chart.Series[3].Color;
    127128        this.chart.PaletteCustomColors = new Color[] { s1Color, s2Color, s3Color, s0Color };
     129
     130        // set the y-axis
     131        var axisY = this.chart.ChartAreas[0].AxisY;
     132        axisY.Title = Content.ProblemData.TargetVariable;
     133        double min = double.MaxValue, max = double.MinValue;
     134        foreach (var point in chart.Series.SelectMany(x => x.Points)) {
     135          if (!point.YValues.Any() || double.IsInfinity(point.YValues[0]) || double.IsNaN(point.YValues[0]))
     136            continue;
     137          var y = point.YValues[0];
     138          if (y < min)
     139            min = y;
     140          if (y > max)
     141            max = y;
     142        }
     143
     144        double axisMin, axisMax, axisInterval;
     145        ChartUtil.CalculateOptimalAxisInterval(min, max, out axisMin, out axisMax, out axisInterval);
     146        axisY.Minimum = axisMin;
     147        axisY.Maximum = axisMax;
     148        axisY.Interval = axisInterval;
    128149
    129150        UpdateCursorInterval();
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r14185 r14277  
    154154      }
    155155
    156       chart.ChartAreas[0].AxisX.Title = residualComboBox.SelectedItem.ToString();
     156      chart.ChartAreas[0].AxisX.Title = string.Format("{0} ({1})", residualComboBox.SelectedItem, Content.ProblemData.TargetVariable);
    157157    }
    158158
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs

    r14185 r14277  
    6464
    6565        this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
    66         this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable;
     66        this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = TARGETVARIABLE_SERIES_NAME;
    6767        this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    6868        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
     
    9797        this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
    9898
    99         // set the y-axis bounds
     99        // set the y-axis
    100100        var axisY = this.chart.ChartAreas[0].AxisY;
     101        axisY.Title = Content.ProblemData.TargetVariable;
    101102        double min = double.MaxValue, max = double.MinValue;
    102103        foreach (var point in chart.Series.SelectMany(x => x.Points)) {
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualHistogram.cs

    r14185 r14277  
    9696
    9797        ChartArea chartArea = chart.ChartAreas[0];
     98        chartArea.AxisX.Title = string.Format("Residuals ({0})", Content.ProblemData.TargetVariable);
    9899        chartArea.AxisX.Minimum = -roundedMax - intervalWidth;
    99100        chartArea.AxisX.Maximum = roundedMax + intervalWidth;
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs

    r14185 r14277  
    172172        double axisMin, axisMax, axisInterval;
    173173        ChartUtil.CalculateOptimalAxisInterval(min, max, out axisMin, out axisMax, out axisInterval);
     174        this.chart.ChartAreas[0].AxisX.Title = "Estimated " + targetVariableName;
    174175        this.chart.ChartAreas[0].AxisX.Maximum = axisMax;
    175176        this.chart.ChartAreas[0].AxisX.Minimum = axisMin;
    176177        this.chart.ChartAreas[0].AxisX.Interval = axisInterval;
     178        this.chart.ChartAreas[0].AxisY.Title = targetVariableName;
    177179        this.chart.ChartAreas[0].AxisY.Maximum = axisMax;
    178180        this.chart.ChartAreas[0].AxisY.Minimum = axisMin;
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs

    r14248 r14277  
    2424using System.Collections.Generic;
    2525using System.Drawing;
     26using System.Globalization;
    2627using System.Linq;
    2728using System.Threading.Tasks;
     
    3839    private readonly Dictionary<string, DensityChart> densityCharts;
    3940    private readonly Dictionary<string, Panel> groupingPanels;
     41    private ModifiableDataset sharedFixedVariables;
    4042
    4143    private const int Points = 200;
     
    122124      });
    123125
    124       var sharedFixedVariables = new ModifiableDataset(doubleVariables.Concat(factorVariables), doubleVariableValues.Concat(factorVariableValues));
     126      if (sharedFixedVariables != null)
     127        sharedFixedVariables.ItemChanged += SharedFixedVariables_ItemChanged;
     128
     129      sharedFixedVariables = new ModifiableDataset(doubleVariables.Concat(factorVariables), doubleVariableValues.Concat(factorVariableValues));
    125130
    126131
     
    218223      variableListView.ItemChecked += variableListView_ItemChecked;
    219224
     225      sharedFixedVariables.ItemChanged += SharedFixedVariables_ItemChanged;
     226
    220227      RecalculateAndRelayoutCharts();
    221228    }
     229
     230    private void SharedFixedVariables_ItemChanged(object sender, EventArgs<int, int> e) {
     231      double yValue = Content.Model.GetEstimatedValues(sharedFixedVariables, new[] { 0 }).Single();
     232      string title = Content.ProblemData.TargetVariable + ": " + yValue.ToString("G5", CultureInfo.CurrentCulture);
     233      foreach (var chart in gradientCharts.Values) {
     234        if (!string.IsNullOrEmpty(chart.YAxisTitle)) { // only show title for first column in grid
     235          chart.YAxisTitle = title;
     236        }
     237      }
     238    }
     239
    222240
    223241    private void OnGradientChartPostPaint(object o, EventArgs e) {
     
    349367      tl.Controls.Clear();
    350368      int row = 0, column = 0;
     369      double yValue = Content.Model.GetEstimatedValues(sharedFixedVariables, new[] { 0 }).Single();
     370      string title = Content.ProblemData.TargetVariable + ": " + yValue.ToString("G5", CultureInfo.CurrentCulture);
     371
    351372      foreach (var v in VisibleVariables) {
    352373        var chartsPanel = groupingPanels[v];
     
    354375
    355376        var chart = gradientCharts[v];
    356         chart.YAxisTitle = column == 0 ? Content.ProblemData.TargetVariable : string.Empty;
     377        chart.YAxisTitle = column == 0 ? title : string.Empty;
    357378        column++;
    358379
  • branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetwork.cs

    r14185 r14277  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Globalization;
    2425using System.Linq;
    2526using HeuristicLab.Common;
     
    6061        .Select(i => string.Format("X{0:000}", i))
    6162        .ToArray();
     63
     64      variableRelevances = new Dictionary<string, IEnumerable<KeyValuePair<string, double>>>();
    6265    }
    6366
     
    8386    protected override int TestPartitionEnd { get { return nTrainingSamples + nTestSamples; } }
    8487
     88    private Dictionary<string, IEnumerable<KeyValuePair<string, double>>> variableRelevances;
     89    public IEnumerable<KeyValuePair<string, double>> GetVariableRelevance(string targetVar) {
     90      return variableRelevances[targetVar];
     91    }
    8592
    8693    protected override List<List<double>> GenerateValues() {
     
    94101      List<string> description = new List<string>(); // store information how the variable is actually produced
    95102      List<string[]> inputVarNames = new List<string[]>(); // store information to produce graphviz file
     103      List<double[]> relevances = new List<double[]>(); // stores variable relevance information (same order as given in inputVarNames)
    96104
    97105      var nrand = new NormalDistributedRandom(random, 0, 1);
    98106      for (int c = 0; c < numLvl0; c++) {
    99         var datai = Enumerable.Range(0, TestPartitionEnd).Select(_ => nrand.NextDouble()).ToList();
    100107        inputVarNames.Add(new string[] { });
    101         description.Add("~ N(0, 1)");
    102         lvl0.Add(datai);
     108        relevances.Add(new double[] { });
     109        description.Add(" ~ N(0, 1)");
     110        lvl0.Add(Enumerable.Range(0, TestPartitionEnd).Select(_ => nrand.NextDouble()).ToList());
    103111      }
    104112
    105113      // lvl1 contains variables which are functions of vars in lvl0 (+ noise)
    106       List<List<double>> lvl1 = new List<List<double>>();
    107114      int numLvl1 = (int)Math.Ceiling(numberOfFeatures * 0.33);
    108       for (int c = 0; c < numLvl1; c++) {
    109         string[] selectedVarNames;
    110         var x = GenerateRandomFunction(random, lvl0, out selectedVarNames);
    111         var sigma = x.StandardDeviation();
    112         var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    113         lvl1.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    114 
    115         inputVarNames.Add(selectedVarNames);
    116         var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
    117         description.Add(string.Format(" ~ N({0}, {1:N3})", desc, noisePrng.Sigma));
    118       }
     115      List<List<double>> lvl1 = CreateVariables(lvl0, numLvl1, inputVarNames, description, relevances);
    119116
    120117      // lvl2 contains variables which are functions of vars in lvl0 and lvl1 (+ noise)
    121       List<List<double>> lvl2 = new List<List<double>>();
    122118      int numLvl2 = (int)Math.Ceiling(numberOfFeatures * 0.2);
    123       for (int c = 0; c < numLvl2; c++) {
    124         string[] selectedVarNames;
    125         var x = GenerateRandomFunction(random, lvl0.Concat(lvl1).ToList(), out selectedVarNames);
    126         var sigma = x.StandardDeviation();
    127         var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    128         lvl2.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    129 
    130         inputVarNames.Add(selectedVarNames);
    131         var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
    132         description.Add(string.Format(" ~ N({0}, {1:N3})", desc, noisePrng.Sigma));
    133       }
     119      List<List<double>> lvl2 = CreateVariables(lvl0.Concat(lvl1).ToList(), numLvl2, inputVarNames, description, relevances);
    134120
    135121      // lvl3 contains variables which are functions of vars in lvl0, lvl1 and lvl2 (+ noise)
    136       List<List<double>> lvl3 = new List<List<double>>();
    137122      int numLvl3 = numberOfFeatures - numLvl0 - numLvl1 - numLvl2;
    138       for (int c = 0; c < numLvl3; c++) {
    139         string[] selectedVarNames;
    140         var x = GenerateRandomFunction(random, lvl0.Concat(lvl1).Concat(lvl2).ToList(), out selectedVarNames);
    141         var sigma = x.StandardDeviation();
    142         var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    143         lvl3.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    144 
    145         inputVarNames.Add(selectedVarNames);
    146         var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
    147         description.Add(string.Format(" ~ N({0}, {1:N3})", desc, noisePrng.Sigma));
    148       }
    149 
    150       networkDefinition = string.Join(Environment.NewLine, variableNames.Zip(description, (n, d) => n + d));
     123      List<List<double>> lvl3 = CreateVariables(lvl0.Concat(lvl1).Concat(lvl2).ToList(), numLvl3, inputVarNames, description, relevances);
     124
     125      this.variableRelevances.Clear();
     126      for (int i = 0; i < variableNames.Length; i++) {
     127        var targetVarName = variableNames[i];
     128        var targetRelevantInputs =
     129          inputVarNames[i].Zip(relevances[i], (inputVar, rel) => new KeyValuePair<string, double>(inputVar, rel))
     130            .ToArray();
     131        variableRelevances.Add(targetVarName, targetRelevantInputs);
     132      }
     133
     134      networkDefinition = string.Join(Environment.NewLine, variableNames.Zip(description, (n, d) => n + d).OrderBy(x => x));
    151135      // for graphviz
    152136      networkDefinition += Environment.NewLine + "digraph G {";
    153       foreach (var t in variableNames.Zip(inputVarNames, Tuple.Create).OrderBy(t => t.Item1)) {
    154         var name = t.Item1;
    155         var selectedVarNames = t.Item2;
    156         foreach (var selectedVarName in selectedVarNames) {
    157           networkDefinition += Environment.NewLine + selectedVarName + " -> " + name;
     137      for (int i = 0; i < variableNames.Length; i++) {
     138        var name = variableNames[i];
     139        var selectedVarNames = inputVarNames[i];
     140        var selectedRelevances = relevances[i];
     141        for (int j = 0; j < selectedVarNames.Length; j++) {
     142          var selectedVarName = selectedVarNames[j];
     143          var selectedRelevance = selectedRelevances[j];
     144          networkDefinition += Environment.NewLine + selectedVarName + " -> " + name +
     145            string.Format(CultureInfo.InvariantCulture, " [label={0:N3}]", selectedRelevance);
    158146        }
    159147      }
    160148      networkDefinition += Environment.NewLine + "}";
    161149
    162       // return a random permutation of all variables
     150      // return a random permutation of all variables (to mix lvl0, lvl1, ... variables)
    163151      var allVars = lvl0.Concat(lvl1).Concat(lvl2).Concat(lvl3).ToList();
    164152      var orderedVars = allVars.Zip(variableNames, Tuple.Create).OrderBy(t => t.Item2).Select(t => t.Item1).ToList();
     
    167155    }
    168156
     157    private List<List<double>> CreateVariables(List<List<double>> allowedInputs, int numVars, List<string[]> inputVarNames, List<string> description, List<double[]> relevances) {
     158      var res = new List<List<double>>();
     159      for (int c = 0; c < numVars; c++) {
     160        string[] selectedVarNames;
     161        double[] relevance;
     162        var x = GenerateRandomFunction(random, allowedInputs, out selectedVarNames, out relevance);
     163        var sigma = x.StandardDeviation();
     164        var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
     165        res.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
     166        Array.Sort(selectedVarNames, relevance);
     167        inputVarNames.Add(selectedVarNames);
     168        relevances.Add(relevance);
     169        var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
     170        // for the relevance information order variables by decreasing relevance
     171        var relevanceStr = string.Join(", ",
     172          selectedVarNames.Zip(relevance, Tuple.Create)
     173          .OrderByDescending(t => t.Item2)
     174          .Select(t => string.Format(CultureInfo.InvariantCulture, "{0}: {1:N3}", t.Item1, t.Item2)));
     175        description.Add(string.Format(" ~ N({0}, {1:N3}) [Relevances: {2}]", desc, noisePrng.Sigma, relevanceStr));
     176      }
     177      return res;
     178    }
     179
    169180    // sample the input variables that are actually used and sample from a Gaussian process
    170     private IEnumerable<double> GenerateRandomFunction(IRandom rand, List<List<double>> xs, out string[] selectedVarNames) {
     181    private IEnumerable<double> GenerateRandomFunction(IRandom rand, List<List<double>> xs, out string[] selectedVarNames, out double[] relevance) {
    171182      double r = -Math.Log(1.0 - rand.NextDouble()) * 2.0; // r is exponentially distributed with lambda = 2
    172183      int nl = (int)Math.Floor(1.5 + r); // number of selected vars is likely to be between three and four
     
    178189      var selectedVars = selectedIdx.Select(i => xs[i]).ToArray();
    179190      selectedVarNames = selectedIdx.Select(i => VariableNames[i]).ToArray();
    180       return SampleGaussianProcess(random, selectedVars);
    181     }
    182 
    183     private IEnumerable<double> SampleGaussianProcess(IRandom random, List<double>[] xs) {
     191      return SampleGaussianProcess(random, selectedVars, out relevance);
     192    }
     193
     194    private IEnumerable<double> SampleGaussianProcess(IRandom random, List<double>[] xs, out double[] relevance) {
    184195      int nl = xs.Length;
    185196      int nRows = xs.First().Count;
     
    218229      alglib.ablas.rmatrixmv(nRows, nRows, K, 0, 0, 0, u, 0, ref y, 0);
    219230
     231      // calculate variable relevance
     232      // as per Rasmussen and Williams "Gaussian Processes for Machine Learning" page 106:
     233      // ,,For the squared exponential covariance function [...] the l1, ..., lD hyperparameters
     234      // play the role of characteristic length scales [...]. Such a covariance function implements
     235      // automatic relevance determination (ARD) [Neal, 1996], since the inverse of the length-scale
     236      // determines how relevant an input is: if the length-scale has a very large value, the covariance
     237      // will become almost independent of that input, effectively removing it from inference.''
     238      relevance = l.Select(li => 1.0 / li).ToArray();
     239
    220240      return y;
    221241    }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetworkInstanceProvider.cs

    r14229 r14277  
    4949    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    5050      var numVariables = new int[] { 10, 20, 50, 100 };
    51       var noiseRatios = new double[] { 0.01, 0.05, 0.1 };
     51      var noiseRatios = new double[] { 0, 0.01, 0.05, 0.1 };
    5252      var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation
    5353      return (from size in numVariables
  • branches/symbreg-factors-2650/HeuristicLab.Tests/Builder.testsettings

    r7915 r14277  
    33  <Description>Test settings to run unit tests on the HL build server.</Description>
    44  <Deployment>
    5     <DeploymentItem filename="HeuristicLab.Tests\HeuristicLab-3.3\Resources\" />
    65    <DeploymentItem filename="bin\" />
    76  </Deployment>
     
    2726    </AgentRule>
    2827  </Execution>
     28  <Properties />
    2929</TestSettings>
  • branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs

    r14276 r14277  
    2929  public class IGraphLayoutTest {
    3030    [TestMethod]
    31     public void TestFruchtermanReingold() {
     31    [TestCategory("ExtLibs")]
     32    [TestCategory("ExtLibs.igraph")]
     33    [TestProperty("Time", "short")]
     34    public void IGraphWrappersLayoutFruchtermanReingoldTest() {
    3235      var graph = new Graph(5, new[] {
    3336        Tuple.Create(0, 1),
  • branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs

    r14276 r14277  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.IGraph.Wrappers;
     
    2728namespace HeuristicLab.Tests {
    2829  [TestClass]
     30  [DeploymentItem("igraph-0.8.0-pre-x86.dll")]
     31  [DeploymentItem("igraph-0.8.0-pre-x64.dll")]
    2932  public class IGraphWrappersGraphTest {
    3033    [TestMethod]
    31     public void IGraphWrappersGraphConstructionAndFinalization() {
     34    [TestCategory("ExtLibs")]
     35    [TestCategory("ExtLibs.igraph")]
     36    [TestProperty("Time", "short")]
     37    public void IGraphWrappersGraphConstructionAndFinalizationTest() {
    3238      var graph = new Graph(5, new[] {
    3339        Tuple.Create(0, 1),
     
    5157
    5258    [TestMethod]
    53     public void TestDensity() {
     59    [TestCategory("ExtLibs")]
     60    [TestCategory("ExtLibs.igraph")]
     61    [TestProperty("Time", "short")]
     62    public void IGraphWrappersGraphDensityTest() {
    5463      var graph = new Graph(5, new[] {
    5564        Tuple.Create(0, 1),
     
    8291
    8392    [TestMethod]
    84     public void TestPageRank() {
     93    [TestCategory("ExtLibs")]
     94    [TestCategory("ExtLibs.igraph")]
     95    [TestProperty("Time", "short")]
     96    public void IGraphWrappersGraphPageRankTest() {
    8597      var graph = new Graph(4, new[] {
    8698        Tuple.Create(0, 1),
     
    125137      Assert.AreEqual(0.173, ranks[3], 0.01);
    126138    }
     139
     140    [TestMethod]
     141    [TestCategory("ExtLibs")]
     142    [TestCategory("ExtLibs.igraph")]
     143    [TestProperty("Time", "short")]
     144    public void IGraphWrappersGraphBreadthFirstWalkTest() {
     145      var graph = new Graph(4, new[] {
     146        Tuple.Create(0, 1),
     147        Tuple.Create(0, 2),
     148        Tuple.Create(1, 2),
     149        Tuple.Create(2, 0),
     150        Tuple.Create(3, 2),
     151      }, directed: true);
     152      var visited = new HashSet<int>();
     153      BreadthFirstHandler handler = (graph1, currentVertexId, previousVertexId, nextVertexId, rank, distance, tag) => {
     154        visited.Add(currentVertexId);
     155        return false;
     156      };
     157      graph.BreadthFirstWalk(handler, 0, DirectedWalkMode.All, true, null);
     158      Assert.AreEqual(4, visited.Count);
     159      Assert.IsTrue(visited.Contains(0));
     160      Assert.IsTrue(visited.Contains(1));
     161      Assert.IsTrue(visited.Contains(2));
     162      Assert.IsTrue(visited.Contains(3));
     163    }
     164
     165    [TestMethod]
     166    [TestCategory("ExtLibs")]
     167    [TestCategory("ExtLibs.igraph")]
     168    [TestProperty("Time", "short")]
     169    public void IGraphWrappersGraphDepthFirstWalkTest() {
     170      var graph = new Graph(4, new[] {
     171        Tuple.Create(0, 1),
     172        Tuple.Create(0, 2),
     173        Tuple.Create(1, 2),
     174        Tuple.Create(2, 0),
     175        Tuple.Create(3, 2),
     176      }, directed: true);
     177      var visited = new HashSet<int>();
     178      DepthFirstHandler handler = (graph1, vertexId, distance, tag) => {
     179        visited.Add(vertexId);
     180        return false;
     181      };
     182      graph.DepthFirstWalk(handler, handler, 0, DirectedWalkMode.All, true, null);
     183      Assert.AreEqual(4, visited.Count);
     184      Assert.IsTrue(visited.Contains(0));
     185      Assert.IsTrue(visited.Contains(1));
     186      Assert.IsTrue(visited.Contains(2));
     187      Assert.IsTrue(visited.Contains(3));
     188    }
    127189  }
    128190}
  • branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs

    r14276 r14277  
    2727  public class IGraphWrappersMatrixTest {
    2828    [TestMethod]
    29     public void IGraphWrappersMatrixConstructionAndFinalization() {
     29    [TestCategory("ExtLibs")]
     30    [TestCategory("ExtLibs.igraph")]
     31    [TestProperty("Time", "short")]
     32    public void IGraphWrappersMatrixConstructionAndFinalizationTest() {
    3033      var matrix = new Matrix(3, 2);
    3134      Assert.AreEqual(3, matrix.Rows);
     
    3740      Assert.AreEqual(2, other.Columns);
    3841      Assert.AreEqual(4, other[0, 0]);
     42
     43      var mat = new double[,] {
     44        { 1, 2, 3 },
     45        { 4, 5, 6}
     46      };
     47      matrix = new Matrix(mat);
     48      Assert.AreEqual(2, matrix.Rows);
     49      Assert.AreEqual(3, matrix.Columns);
     50      var test = matrix.ToMatrix();
     51      for (var i = 0; i < matrix.Rows; i++)
     52        for (var j = 0; j < matrix.Columns; j++) {
     53          Assert.AreEqual(mat[i, j], matrix[i, j]);
     54          Assert.AreEqual(mat[i, j], test[i, j]);
     55        }
    3956    }
    4057
    4158    [TestMethod]
     59    [TestCategory("ExtLibs")]
     60    [TestCategory("ExtLibs.igraph")]
     61    [TestProperty("Time", "short")]
    4262    public void IGraphWrappersMatrixGetSetTest() {
    4363      var matrix = new Matrix(3, 2);
     
    6181          Assert.AreEqual(matrix[i, j], netmat[i, j]);
    6282    }
     83
     84    [TestMethod]
     85    [TestCategory("ExtLibs")]
     86    [TestCategory("ExtLibs.igraph")]
     87    [TestProperty("Time", "short")]
     88    public void IGraphWrappersMatrixFillTest() {
     89      var matrix = new Matrix(3, 2);
     90      matrix.Fill(2.6);
     91      Assert.AreEqual(2.6, matrix[0, 0]);
     92      Assert.AreEqual(2.6, matrix[0, 1]);
     93      Assert.AreEqual(2.6, matrix[1, 0]);
     94      Assert.AreEqual(2.6, matrix[1, 1]);
     95      Assert.AreEqual(2.6, matrix[2, 0]);
     96      Assert.AreEqual(2.6, matrix[2, 1]);
     97    }
     98
     99    [TestMethod]
     100    [TestCategory("ExtLibs")]
     101    [TestCategory("ExtLibs.igraph")]
     102    [TestProperty("Time", "short")]
     103    public void IGraphWrappersMatrixTransposeTest() {
     104      var matrix = new Matrix(3, 2);
     105      matrix.Transpose();
     106      Assert.AreEqual(2, matrix.Rows);
     107      Assert.AreEqual(3, matrix.Columns);
     108    }
     109
     110    [TestMethod]
     111    [TestCategory("ExtLibs")]
     112    [TestCategory("ExtLibs.igraph")]
     113    [TestProperty("Time", "short")]
     114    public void IGraphWrappersMatrixScaleTest() {
     115      var matrix = new Matrix(3, 2);
     116      matrix[0, 0] = matrix[0, 1] = 4;
     117      matrix[1, 0] = 3;
     118      matrix[1, 1] = 2;
     119      matrix[2, 0] = 1.5;
     120      matrix[2, 1] = -0.5;
     121      matrix.Scale(2);
     122      Assert.AreEqual(8, matrix[0, 0]);
     123      Assert.AreEqual(8, matrix[0, 1]);
     124      Assert.AreEqual(6, matrix[1, 0]);
     125      Assert.AreEqual(4, matrix[1, 1]);
     126      Assert.AreEqual(3, matrix[2, 0]);
     127      Assert.AreEqual(-1, matrix[2, 1]);
     128    }
    63129  }
    64130}
  • branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs

    r14276 r14277  
    2020#endregion
    2121
     22using System.Linq;
    2223using HeuristicLab.IGraph.Wrappers;
    2324using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    2728  public class IGraphWrappersVectorTest {
    2829    [TestMethod]
    29     public void IGraphWrappersVectorConstructionAndFinalization() {
     30    [TestCategory("ExtLibs")]
     31    [TestCategory("ExtLibs.igraph")]
     32    [TestProperty("Time", "short")]
     33    public void IGraphWrappersVectorConstructionAndFinalizationTest() {
    3034      var vector = new Vector(7);
    3135      Assert.AreEqual(7, vector.Length);
     
    3539      Assert.AreEqual(7, other.Length);
    3640      Assert.AreEqual(4, other[0]);
     41
     42      var myvec = new double[] { 1, 2, 3 };
     43      vector = new Vector(myvec);
     44      Assert.AreEqual(3, vector.Length);
     45      Assert.AreEqual(myvec[0], vector[0]);
     46      Assert.AreEqual(myvec[1], vector[1]);
     47      Assert.AreEqual(myvec[2], vector[2]);
    3748    }
    3849
    3950    [TestMethod]
     51    [TestCategory("ExtLibs")]
     52    [TestCategory("ExtLibs.igraph")]
     53    [TestProperty("Time", "short")]
    4054    public void IGraphWrappersVectorGetSetTest() {
    4155      var vector = new Vector(5);
     
    5569        Assert.AreEqual(vector[i], netmat[i]);
    5670    }
     71
     72    [TestMethod]
     73    [TestCategory("ExtLibs")]
     74    [TestCategory("ExtLibs.igraph")]
     75    [TestProperty("Time", "short")]
     76    public void IGraphWrappersVectorFillTest() {
     77      var vector = new Vector(5);
     78      vector.Fill(2.3);
     79      Assert.IsTrue(new[] { 2.3, 2.3, 2.3, 2.3, 2.3 }.SequenceEqual(vector.ToArray()));
     80    }
     81
     82    [TestMethod]
     83    [TestCategory("ExtLibs")]
     84    [TestCategory("ExtLibs.igraph")]
     85    [TestProperty("Time", "short")]
     86    public void IGraphWrappersVectorReverseTest() {
     87      var vector = new Vector(5);
     88      vector[0] = vector[1] = 4;
     89      vector[2] = 3;
     90      vector[3] = 1.5;
     91      vector[4] = -0.5;
     92      vector.Reverse();
     93      Assert.IsTrue(new[] { -0.5, 1.5, 3, 4, 4 }.SequenceEqual(vector.ToArray()));
     94    }
     95
     96    [TestMethod]
     97    [TestCategory("ExtLibs")]
     98    [TestCategory("ExtLibs.igraph")]
     99    [TestProperty("Time", "short")]
     100    public void IGraphWrappersVectorShuffleTest() {
     101      var vector = new Vector(5);
     102      vector[0] = vector[1] = 4;
     103      vector[2] = 3;
     104      vector[3] = 1.5;
     105      vector[4] = -0.5;
     106      vector.Shuffle();
     107      Assert.IsFalse(new[] { -0.5, 1.5, 3, 4, 4 }.SequenceEqual(vector.ToArray()));
     108      Assert.IsFalse(new[] { 4, 4, 3, 1.5, -0.5 }.SequenceEqual(vector.ToArray()));
     109    }
     110
     111    [TestMethod]
     112    [TestCategory("ExtLibs")]
     113    [TestCategory("ExtLibs.igraph")]
     114    [TestProperty("Time", "short")]
     115    public void IGraphWrappersVectorScaleTest() {
     116      var vector = new Vector(5);
     117      vector[0] = vector[1] = 4;
     118      vector[2] = 3;
     119      vector[3] = 1.5;
     120      vector[4] = -0.5;
     121      vector.Scale(2);
     122      Assert.IsTrue(new double[] { 8, 8, 6, 3, -1 }.SequenceEqual(vector.ToArray()));
     123    }
    57124  }
    58125}
  • branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r14276 r14277  
    219219      <Private>False</Private>
    220220    </Reference>
    221     <Reference Include="HeuristicLab.igraph-0.8.0-pre, Version=0.8.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    222       <SpecificVersion>False</SpecificVersion>
    223       <HintPath>..\bin\HeuristicLab.igraph-0.8.0-pre.dll</HintPath>
     221    <Reference Include="HeuristicLab.IGraph-0.8.0-pre, Version=0.8.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     222      <SpecificVersion>False</SpecificVersion>
     223      <HintPath>..\bin\HeuristicLab.IGraph-0.8.0-pre.dll</HintPath>
     224      <Private>False</Private>
    224225    </Reference>
    225226    <Reference Include="HeuristicLab.MainForm-3.3">
     
    565566    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubtreeCrossoverTest.cs" />
    566567    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\Util.cs" />
    567     <Compile Include="HeuristicLab.IGraph\IGraphWrappersGraphTest.cs" />
    568     <Compile Include="HeuristicLab.IGraph\IGraphLayoutTest.cs" />
    569     <Compile Include="HeuristicLab.IGraph\IGraphWrappersVectorTest.cs" />
    570     <Compile Include="HeuristicLab.IGraph\IGraphWrappersMatrixTest.cs" />
    571568    <Compile Include="HeuristicLab.Persistence-3.3\StorableAttributeTests.cs" />
    572569    <Compile Include="HeuristicLab.Persistence-3.3\UseCases.cs" />
  • branches/symbreg-factors-2650/HeuristicLab/3.3/HeuristicLab-3.3.csproj

    r14207 r14277  
    226226</PostBuildEvent>
    227227  </PropertyGroup>
    228   <PropertyGroup>
    229     <PostBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    230 set ProjectDir=$(ProjectDir)
    231 set SolutionDir=$(SolutionDir)
    232 set OutDir=$(OutDir)
    233 set TargetDir=$(TargetDir)
    234 set Platform=$(PlatformName)
    235 set Configuration=$(ConfigurationName)
    236 
    237 call "$(SolutionDir)MergeConfigs.cmd"</PostBuildEvent>
    238   </PropertyGroup>
    239228</Project>
Note: See TracChangeset for help on using the changeset viewer.