- Timestamp:
- 02/24/17 13:16:09 (8 years ago)
- 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 78 78 double[,] factorMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows); 79 79 80 inputMatrix = factorMatrix. VertCat(inputMatrix);80 inputMatrix = factorMatrix.HorzCat(inputMatrix); 81 81 82 82 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 79 79 double[,] binaryMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows); 80 80 double[,] doubleVarMatrix = AlglibUtil.PrepareInputMatrix(dataset, doubleVariables.Concat(new string[] { targetVariable }), rows); 81 var inputMatrix = binaryMatrix. VertCat(doubleVarMatrix);81 var inputMatrix = binaryMatrix.HorzCat(doubleVarMatrix); 82 82 83 83 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 76 76 var factorVariableValues = AlglibUtil.GetFactorVariableValues(dataset, factorVariableNames, rows); 77 77 var factorMatrix = AlglibUtil.PrepareInputMatrix(dataset, factorVariableValues, rows); 78 inputMatrix = factorMatrix. VertCat(inputMatrix);78 inputMatrix = factorMatrix.HorzCat(inputMatrix); 79 79 80 80 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 100 100 double[,] factorData = AlglibUtil.PrepareInputMatrix(dataset, factorVariables, rows); 101 101 102 inputData = factorData. VertCat(inputData);102 inputData = factorData.HorzCat(inputData); 103 103 104 104 int n = inputData.GetLength(0); -
branches/symbreg-factors-2650/HeuristicLab.Common/3.3/MatrixExtensions.cs
r14237 r14701 39 39 40 40 /// <summary> 41 /// Concatenates matrices horizontally.41 /// Concatenates matrices vertically. 42 42 /// A B 43 43 /// 1 2 9 8 44 44 /// 3 4 7 6 45 45 /// 46 /// HorzCat(A, B)46 /// VertCat(A, B) 47 47 /// 1 2 48 48 /// 3 4 … … 54 54 /// <param name="b"></param> 55 55 /// <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) { 57 57 Contract.Assert(a.GetLength(1) == b.GetLength(1)); 58 58 var aLen = a.GetLength(0); … … 68 68 return result; 69 69 } 70 70 71 /// <summary> 71 /// Concatenates matrices vertically.72 /// Concatenates matrices horizontally. 72 73 /// A B 73 74 /// 1 2 9 8 74 75 /// 3 4 7 6 75 76 /// 76 /// VertCat(A, B)77 /// HorzCat(A, B) 77 78 /// 1 2 9 8 78 79 /// 3 4 7 6 … … 82 83 /// <param name="b"></param> 83 84 /// <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) { 85 86 Contract.Assert(a.GetLength(0) == b.GetLength(0)); 86 87 var aLen = a.GetLength(1);
Note: See TracChangeset
for help on using the changeset viewer.