Last change
on this file since 18242 was
17479,
checked in by kyang, 5 years ago
|
#3057
- upload the latest version of ALPS with SMS-EMOA
- upload the related dynamic test problems (dynamic, single-objective symbolic regression), written by David Daninel.
|
File size:
1.1 KB
|
Line | |
---|
1 | using HEAL.Attic;
|
---|
2 | using System;
|
---|
3 | using System.Collections.Generic;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading.Tasks;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Algorithms.OESRALPS.DriftDetection
|
---|
9 | {
|
---|
10 | [StorableType("714CA0E4-A88F-44D1-A2D0-92F4D8251C04")]
|
---|
11 | public class SequentialADWIN : ADWIN
|
---|
12 | {
|
---|
13 | public SequentialADWIN() { }
|
---|
14 |
|
---|
15 | public SequentialADWIN(double delta, int minKeepSize = 100, int minCutSize = 100)
|
---|
16 | : base(delta, minKeepSize, minCutSize)
|
---|
17 | {
|
---|
18 | }
|
---|
19 |
|
---|
20 | public override bool Execute(ref Histogram histogram)
|
---|
21 | {
|
---|
22 | bool tryToFindCut = true;
|
---|
23 | bool cutFound = false;
|
---|
24 | while (tryToFindCut)
|
---|
25 | {
|
---|
26 | tryToFindCut = false;
|
---|
27 | if (CheckHistogramForCut(histogram, histogram.GetEnumerator(), histogram.NumBuckets - 1))
|
---|
28 | {
|
---|
29 | histogram.RemoveBuckets(1);
|
---|
30 | tryToFindCut = true;
|
---|
31 | cutFound = true;
|
---|
32 | }
|
---|
33 | }
|
---|
34 | return cutFound;
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override void Terminate()
|
---|
38 | {
|
---|
39 | }
|
---|
40 | }
|
---|
41 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.