- Timestamp:
- 10/20/09 11:20:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorCreator.cs
r2421 r2440 40 40 //Dataset infos 41 41 AddVariableInfo(new VariableInfo("Dataset", "Dataset with all samples on which to apply the function", typeof(Dataset), VariableKind.In)); 42 AddVariableInfo(new VariableInfo("TargetVariable", " Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));42 AddVariableInfo(new VariableInfo("TargetVariable", "Name of the target variable", typeof(StringData), VariableKind.In)); 43 43 AddVariableInfo(new VariableInfo("InputVariables", "List of allowed input variable names", typeof(ItemList), VariableKind.In)); 44 44 AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); … … 70 70 abortRequested = false; 71 71 Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true); 72 int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data; 73 ItemList inputVaribales = GetVariableValue<ItemList>("InputVariables", scope, true); 74 var inputVariableNames = from x in inputVaribales 72 string targetVariable = GetVariableValue<StringData>("TargetVariable", scope, true).Data; 73 int targetVariableIndex = dataset.GetVariableIndex(targetVariable); 74 ItemList inputVariables = GetVariableValue<ItemList>("InputVariables", scope, true); 75 var inputVariableNames = from x in inputVariables 75 76 select ((StringData)x).Data; 76 77 int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data; … … 93 94 parameter.Probability = false; 94 95 95 SVM.Problem problem = SVMHelper.CreateSVMProblem(dataset, targetVariable , inputVariableNames, start, end, minTimeOffset, maxTimeOffset);96 SVM.Problem problem = SVMHelper.CreateSVMProblem(dataset, targetVariableIndex, inputVariableNames, start, end, minTimeOffset, maxTimeOffset); 96 97 SVM.RangeTransform rangeTransform = SVM.RangeTransform.Compute(problem); 97 98 SVM.Problem scaledProblem = rangeTransform.Scale(problem);
Note: See TracChangeset
for help on using the changeset viewer.