Changeset 12321
- Timestamp:
- 04/16/15 13:57:16 (10 years ago)
- Location:
- branches/HeuristicLab.VariableInteractionNetworks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/VariableInteractionNetworkView.cs
r12320 r12321 148 148 var variableNames = (from variableImpact in allVariableImpacts 149 149 from variableName in variableImpact.RowNames 150 select variableName) 151 .Distinct().ToArray(); 150 select variableName).Distinct().ToArray(); 152 151 153 152 List<string> variableNamesList = (from variableName in variableNames … … 189 188 private DoubleMatrix UpdateAdjacencyMatrixByThreshold(double threshold, DoubleMatrix adjMatrix) 190 189 { 191 // var updatedMatrix = (DoubleMatrix) adjMatrix.Clone();192 190 var originalMatrix = (DoubleMatrix)viewHost1.Content; 193 191 var groupRunCollection = Content.GroupBy(x => ((IRegressionProblemData)x.Parameters["ProblemData"]).TargetVariable).ToList(); -
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/CreateTargetVariationExperimentDialog.cs
r12320 r12321 25 25 public Experiment Experiment { get; private set; } 26 26 private int repetitions; 27 28 27 29 28 public CreateTargetVariationExperimentDialog() : this(null) { } 30 29 public CreateTargetVariationExperimentDialog(IAlgorithm alg) … … 51 50 throw new InvalidOperationException("Null algorithm!"); 52 51 53 var problem = algorithm.Problem; 54 var regressionProblem = problem as IRegressionProblem; 52 var regressionProblem = algorithm.Problem as IRegressionProblem; 55 53 if (regressionProblem == null) 56 throw new Exception();54 throw new InvalidOperationException("Null regression problem!!"); 57 55 58 56 var problemData = regressionProblem.ProblemData; 59 57 var variables = problemData.InputVariables.ToList(); 58 int checksNo = 0; 60 59 61 60 for (int i = 0; i < variables.Count; i++) 62 61 { 62 if (!problemData.InputVariables.ItemChecked(problemData.InputVariables[i])) 63 continue; 64 63 65 var alg = (IAlgorithm)algorithm.Clone(); 64 66 var pd = ((IRegressionProblem)alg.Problem).ProblemData; 67 checksNo++; 65 68 66 69 // set target to false 67 70 pd.InputVariables.SetItemCheckedState(pd.InputVariables[i], false); 68 71 69 72 pd.TargetVariable = pd.InputVariables[i].Value; 73 70 74 alg.Name += "{Target variable=" + pd.TargetVariable + "}"; 71 75 72 var batchrun = new BatchRun("Batchrun" + i)76 var batchrun = new BatchRun("Batchrun" + checksNo) 73 77 { 74 78 Repetitions = repetitions,
Note: See TracChangeset
for help on using the changeset viewer.