TraceLab Component Library
Main Page
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
GibbsLDA-GAConfig.cs
Go to the documentation of this file.
1
// TraceLab Component Library
2
// Copyright © 2012-2013 SEMERU
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
using
System;
18
using
System.Collections.Generic;
19
using
System.ComponentModel;
20
using
System.Linq;
21
using
System.Text;
22
23
namespace
TraceLab.Components.Types.Tracers.InformationRetrieval
24
{
25
public
class
GibbsLDA_GAConfig
:
GibbsLDAConfig
26
{
27
#region Private members
28
29
private
int
_Run;
30
private
int
_Pop;
31
private
int
_Elite;
32
private
double
_PRate;
33
34
#endregion
35
36
[DisplayName(
"GA Iterations"
)]
37
[Description(
"Number of iterations to run the algorithm."
)]
38
public
int
GA_Iterations
39
{
40
get
41
{
42
return
_Run;
43
}
44
set
45
{
46
if
(value <= 0)
47
throw
new
ArgumentException(
"Iterations must be greater than 0."
);
48
else
49
_Run = value;
50
}
51
}
52
53
[Description(
"Stop after this many iterations with no improvement."
)]
54
public
int
Run
55
{
56
get
57
{
58
return
_Run;
59
}
60
set
61
{
62
if
(value <= 0)
63
throw
new
ArgumentException(
"Run must be greater than 0."
);
64
else
65
_Run = value;
66
}
67
}
68
69
[Description(
"Rate of permutation for each iteration."
)]
70
public
double
PermutationRate
71
{
72
get
73
{
74
return
_PRate;
75
}
76
set
77
{
78
if
(value <= 0.0)
79
throw
new
ArgumentException(
"Permutation rate must be greater than 0."
);
80
else
81
_PRate = value;
82
}
83
}
84
85
[Description(
"Population size per iteration."
)]
86
public
int
Population
87
{
88
get
89
{
90
return
_Pop;
91
}
92
set
93
{
94
if
(value <= 0)
95
throw
new
ArgumentException(
"Population must be greater than 0."
);
96
else
97
_Pop = value;
98
}
99
}
100
101
[Description(
"Number of best individuals to carry over to next iteration."
)]
102
public
int
Elitism
103
{
104
get
105
{
106
return
_Elite;
107
}
108
set
109
{
110
if
(value <= 0)
111
throw
new
ArgumentException(
"Elitism must be greater than 0."
);
112
else
113
_Elite = value;
114
}
115
}
116
}
117
}
TraceLab.Components.RPlugin
TraceLab.Components.RPlugin.Types
Tracers
InformationRetrieval
GibbsLDA-GAConfig.cs
Generated on Mon May 20 2013 18:13:11 for TraceLab Component Library by
1.8.4