Class NearestNeighborEerClassifier
This IDistanceClassifier implementation will consider both test and training samples and claculate the threshold to separate the original and forged signatures to approximate EER. Note that this classifier is not applicable for real world scenarios. It was developed to test the theoratical boundaries of threshold based classification
Inherited Members
Namespace: SigStat.Common.PipelineItems.Classifiers
Assembly: SigStat.Common.dll
Syntax
public class NearestNeighborEerClassifier : PipelineBase, ILoggerObject, IProgress, IPipelineIO
Constructors
| Improve this Doc View SourceNearestNeighborEerClassifier(Nullable<Int32>, IDistance<Double[][]>)
Initializes a new instance of the OptimalDtwClassifier class.
Declaration
public NearestNeighborEerClassifier(int? nearestNeighborCount, IDistance<double[][]> distanceFunction = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | nearestNeighborCount | The number of nearest neighbours to consider during classification |
IDistance<System.Double[][]> | distanceFunction | The distance function. |
Properties
| Improve this Doc View SourceDistanceFunction
The function used to calculate the distance between two data sequences
Declaration
public IDistance<double[][]> DistanceFunction { get; set; }
Property Value
Type | Description |
---|---|
IDistance<System.Double[][]> |
Features
FeatureDescriptors to consider during classification
Declaration
public List<FeatureDescriptor> Features { get; set; }
Property Value
Type | Description |
---|---|
List<FeatureDescriptor> |
NearestNeighborCount
The number of nearest neighbors to consider during evaluation. Set it to null to use all training signatures.
Declaration
public int? NearestNeighborCount { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Sampler
Sampler used for selecting training and test sets during a benchmark
Declaration
public Sampler Sampler { get; set; }
Property Value
Type | Description |
---|---|
Sampler |
Methods
| Improve this Doc View SourceTest(ISignerModel, Signature)
Declaration
public double Test(ISignerModel signerModel, Signature signature)
Parameters
Type | Name | Description |
---|---|---|
ISignerModel | signerModel | |
Signature | signature |
Returns
Type | Description |
---|---|
System.Double |
Train(List<Signature>)
Declaration
public ISignerModel Train(List<Signature> signatures)
Parameters
Type | Name | Description |
---|---|---|
List<Signature> | signatures |
Returns
Type | Description |
---|---|
ISignerModel |
Train(List<Signature>, DistanceMatrix<String, String, Double>)
Trains the specified signatures based on a precalculated distance matrix
Declaration
public ISignerModel Train(List<Signature> signatures, DistanceMatrix<string, string, double> distanceMatrix)
Parameters
Type | Name | Description |
---|---|---|
List<Signature> | signatures | The signatures. |
DistanceMatrix<System.String, System.String, System.Double> | distanceMatrix | The distance matrix may contain all the distance pairs for the signatures. If you ommit this parameter, distances will be calculated automatically using DistanceFunction. |
Returns
Type | Description |
---|---|
ISignerModel |