Changeset 6576 for trunk/sources
- Timestamp:
- 07/20/11 15:05:58 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
r6567 r6576 129 129 <SubType>Code</SubType> 130 130 </Compile> 131 <Compile Include="Linear\LogitClassificationSolution.cs" />132 <Compile Include="Linear\LogitModel.cs" />133 131 <Compile Include="Linear\MultinomialLogitClassification.cs" /> 132 <Compile Include="Linear\MultinomialLogitClassificationSolution.cs" /> 133 <Compile Include="Linear\MultinomialLogitModel.cs" /> 134 134 <Compile Include="Properties\AssemblyInfo.cs" /> 135 135 <Compile Include="RandomForest\RandomForestClassificationSolution.cs" /> -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r6575 r6576 98 98 relClassError = alglib.mnlrelclserror(lm, inputMatrix, nRows); 99 99 100 LogitClassificationSolution solution = new LogitClassificationSolution(problemData, newLogitModel(lm, targetVariable, allowedInputVariables, classValues));100 MultinomialLogitClassificationSolution solution = new MultinomialLogitClassificationSolution(problemData, new MultinomialLogitModel(lm, targetVariable, allowedInputVariables, classValues)); 101 101 return solution; 102 102 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassificationSolution.cs
r6574 r6576 33 33 /// Represents a multinomial logit solution for a classification problem which can be visualized in the GUI. 34 34 /// </summary> 35 [Item(" LogitClassificationSolution", "Represents a multinomial logit solution for a classification problem which can be visualized in the GUI.")]35 [Item("Multinomial Logit Classification Solution", "Represents a multinomial logit solution for a classification problem which can be visualized in the GUI.")] 36 36 [StorableClass] 37 public sealed class LogitClassificationSolution : ClassificationSolution {37 public sealed class MultinomialLogitClassificationSolution : ClassificationSolution { 38 38 39 public new LogitModel Model {40 get { return ( LogitModel)base.Model; }39 public new MultinomialLogitModel Model { 40 get { return (MultinomialLogitModel)base.Model; } 41 41 set { base.Model = value; } 42 42 } 43 43 44 44 [StorableConstructor] 45 private LogitClassificationSolution(bool deserializing) : base(deserializing) { }46 private LogitClassificationSolution(LogitClassificationSolution original, Cloner cloner)45 private MultinomialLogitClassificationSolution(bool deserializing) : base(deserializing) { } 46 private MultinomialLogitClassificationSolution(MultinomialLogitClassificationSolution original, Cloner cloner) 47 47 : base(original, cloner) { 48 48 } 49 public LogitClassificationSolution(IClassificationProblemData problemData,LogitModel logitModel)49 public MultinomialLogitClassificationSolution(IClassificationProblemData problemData, MultinomialLogitModel logitModel) 50 50 : base(logitModel, problemData) { 51 51 } 52 52 53 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new LogitClassificationSolution(this, cloner);54 return new MultinomialLogitClassificationSolution(this, cloner); 55 55 } 56 56 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs
r6575 r6576 37 37 [StorableClass] 38 38 [Item("Multinomial Logit Model", "Represents a multinomial logit model for classification.")] 39 public sealed class LogitModel : NamedItem, IClassificationModel {39 public sealed class MultinomialLogitModel : NamedItem, IClassificationModel { 40 40 41 41 private alglib.logitmodel logitModel; … … 58 58 private double[] classValues; 59 59 [StorableConstructor] 60 private LogitModel(bool deserializing)60 private MultinomialLogitModel(bool deserializing) 61 61 : base(deserializing) { 62 62 if (deserializing) 63 63 logitModel = new alglib.logitmodel(); 64 64 } 65 private LogitModel(LogitModel original, Cloner cloner)65 private MultinomialLogitModel(MultinomialLogitModel original, Cloner cloner) 66 66 : base(original, cloner) { 67 67 logitModel = new alglib.logitmodel(); … … 71 71 this.classValues = (double[])original.classValues.Clone(); 72 72 } 73 public LogitModel(alglib.logitmodel logitModel, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues)73 public MultinomialLogitModel(alglib.logitmodel logitModel, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues) 74 74 : base() { 75 75 this.name = ItemName; … … 82 82 83 83 public override IDeepCloneable Clone(Cloner cloner) { 84 return new LogitModel(this, cloner);84 return new MultinomialLogitModel(this, cloner); 85 85 } 86 86
Note: See TracChangeset
for help on using the changeset viewer.