|
SharpBCI
A multi-threaded brain control interface (BCI) library in C#
|
The TournamentArtifactDetector holds a "tournament" of some number ARArtifactDetectors (termed competitors) The majority consensus of the most well-fit models is the final determination of whether or not the data is an artifact. More...
Public Member Functions | |
| TournamentArtifactDetector (uint tournamentSize, uint learningSetSize, uint nAccept, uint initialMerits) | |
| double | Error () |
| Inform the caller of the current confusion of this implementation The returned value should be a double greater than or equal to zero Otherwise no range is assumed, but lower values should indicate lower confusion For example, a detector that perfectly models the signal with no artifacts should have an error of zero Pragmatically, error will generally be non-zero due to presence of artifacts and noise. More... | |
| bool | Detect (double data) |
| Update artifact detector using next. More... | |
Protected Member Functions | |
| IArtifactDetector | NewCompetitor () |
The TournamentArtifactDetector holds a "tournament" of some number ARArtifactDetectors (termed competitors) The majority consensus of the most well-fit models is the final determination of whether or not the data is an artifact.
The detector defines a concept called "(de)merits". (De)merits are points which are added when the competitor's error is low and taken away when the competitor's error is high. If the (de)merits of a competitor is less than zero, it will be ejected from the tournament and replaced with a newly fit competitor. Thus, every once in a while, the artifact detector will potentially re-fit some number of competitors. The time interval, in the worst case, between re-fits of the model is determined by initialMerits. In this way, the TournamentArtifactDetector will converge on the best fit for the underlying process while this process is wide-sense stationary. If the underlying process changes model, the TournamentArtifactDetector will eventually converge on the best-fit for the new process.
| SharpBCI.TournamentArtifactDetector.TournamentArtifactDetector | ( | uint | tournamentSize, |
| uint | learningSetSize, | ||
| uint | nAccept, | ||
| uint | initialMerits | ||
| ) |
| tournamentSize | the number of competitors in the tournament |
| learningSetSize | the size of the dataset used to fit new competitors |
| nAccept | how many competitors should be used to determine the consensus opinion of the detector |
| initialMerits | competitors which have high error will be ejected |
| bool SharpBCI.TournamentArtifactDetector.Detect | ( | double | next | ) |
Update artifact detector using next.
Implements SharpBCI.IArtifactDetector.
| double SharpBCI.TournamentArtifactDetector.Error | ( | ) |
Inform the caller of the current confusion of this implementation The returned value should be a double greater than or equal to zero Otherwise no range is assumed, but lower values should indicate lower confusion For example, a detector that perfectly models the signal with no artifacts should have an error of zero Pragmatically, error will generally be non-zero due to presence of artifacts and noise.
Implements SharpBCI.IArtifactDetector.
|
protected |