Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14701


Ignore:
Timestamp:
02/24/17 13:16:09 (8 years ago)
Author:
mkommend
Message:

#2650: Switched definition of vertical and horizontal concatination of matrixes.

Location:
branches/symbreg-factors-2650
Files:
5 edited

Legend:

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

    r14542 r14701  
    7878      double[,] factorMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows);
    7979
    80       inputMatrix = factorMatrix.VertCat(inputMatrix);
     80      inputMatrix = factorMatrix.HorzCat(inputMatrix);
    8181
    8282      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs

    r14542 r14701  
    7979      double[,] binaryMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows);
    8080      double[,] doubleVarMatrix = AlglibUtil.PrepareInputMatrix(dataset, doubleVariables.Concat(new string[] { targetVariable }), rows);
    81       var inputMatrix = binaryMatrix.VertCat(doubleVarMatrix);
     81      var inputMatrix = binaryMatrix.HorzCat(doubleVarMatrix);
    8282
    8383      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs

    r14542 r14701  
    7676      var factorVariableValues = AlglibUtil.GetFactorVariableValues(dataset, factorVariableNames, rows);
    7777      var factorMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariableValues, rows);
    78       inputMatrix = factorMatrix.VertCat(inputMatrix);
     78      inputMatrix = factorMatrix.HorzCat(inputMatrix);
    7979
    8080      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs

    r14240 r14701  
    100100      double[,] factorData = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows);
    101101
    102       inputData = factorData.VertCat(inputData);
     102      inputData = factorData.HorzCat(inputData);
    103103
    104104      int n = inputData.GetLength(0);
  • branches/symbreg-factors-2650/HeuristicLab.Common/3.3/MatrixExtensions.cs

    r14237 r14701  
    3939
    4040    /// <summary>
    41     /// Concatenates matrices horizontally.
     41    /// Concatenates matrices vertically.
    4242    /// A      B
    4343    /// 1 2    9 8
    4444    /// 3 4    7 6
    4545    ///
    46     /// HorzCat(A, B)
     46    /// VertCat(A, B)
    4747    /// 1 2
    4848    /// 3 4
     
    5454    /// <param name="b"></param>
    5555    /// <returns>A new matrix with the number of rows = a.GetLength(0) + b.GetLength(0)</returns>
    56     public static T[,] HorzCat<T>(this T[,] a, T[,] b) {
     56    public static T[,] VertCat<T>(this T[,] a, T[,] b) {
    5757      Contract.Assert(a.GetLength(1) == b.GetLength(1));
    5858      var aLen = a.GetLength(0);
     
    6868      return result;
    6969    }
     70
    7071    /// <summary>
    71     /// Concatenates matrices vertically.
     72    /// Concatenates matrices horizontally.
    7273    /// A      B
    7374    /// 1 2    9 8
    7475    /// 3 4    7 6
    7576    ///
    76     /// VertCat(A, B)
     77    /// HorzCat(A, B)
    7778    /// 1 2 9 8
    7879    /// 3 4 7 6
     
    8283    /// <param name="b"></param>
    8384    /// <returns>A new matrix with the number of columns = a.GetLength(1) + b.GetLength(1)</returns>
    84     public static T[,] VertCat<T>(this T[,] a, T[,] b) {
     85    public static T[,] HorzCat<T>(this T[,] a, T[,] b) {
    8586      Contract.Assert(a.GetLength(0) == b.GetLength(0));
    8687      var aLen = a.GetLength(1);
Note: See TracChangeset for help on using the changeset viewer.