Class BinaryCluster
Inheritance
BinaryCluster
Assembly: AudioAnalysisTools.dll
Syntax
public sealed class BinaryCluster
Constructors
|
Improve this Doc
View Source
BinaryCluster(Int32, Int32)
Initializes a new instance of the BinaryCluster class.
CONSTRUCTOR.
Declaration
public BinaryCluster(int ipSize, int opSize)
Parameters
Fields
|
Improve this Doc
View Source
Verbose
Declaration
public static bool Verbose
Field Value
Properties
|
Improve this Doc
View Source
IPSize
Declaration
public int IPSize { get; set; }
Property Value
|
Improve this Doc
View Source
MomentumBeta
Declaration
public double MomentumBeta { get; set; }
Property Value
|
Improve this Doc
View Source
OPSize
Declaration
public int OPSize { get; set; }
Property Value
|
Improve this Doc
View Source
RandomiseTrnSetOrder
Declaration
public static bool RandomiseTrnSetOrder { get; set; }
Property Value
|
Improve this Doc
View Source
VigilanceRho
Declaration
public double VigilanceRho { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AND_OR_Similarity(Double[], Double[])
Given two binary vectors, returns the 'AND count' divided by the 'OR count'.
The AND count is always less than or equal to OR count and therefore
the returned values must lie in 0,1.
Is equivalent to average of recall and precision if one of the vectors is considered a target.
Method assumes that both vectors are of the same length.
Declaration
public static double AND_OR_Similarity(double[] v1, double[] v2)
Parameters
Returns
|
Improve this Doc
View Source
ChangeWts(Double[], Double[])
original Pascal header was: Procedure ChangeWtsFuzzyART(var index:word).
Declaration
public int ChangeWts(double[] IP, double[] OP)
Parameters
Returns
|
Improve this Doc
View Source
ChangeWtsOfCommittedNode(Double[], Int32)
change weights of a committed node
if beta = 1 then fast learning, if beta = 0 then leader learning ie no change of wts.
Declaration
public void ChangeWtsOfCommittedNode(double[] IP, int index)
Parameters
|
Improve this Doc
View Source
ChangeWtsOfFirstUncommittedNode(Double[])
sets wts of first uncommitted node to the current IP vector.
Declaration
public int ChangeWtsOfFirstUncommittedNode(double[] IP)
Parameters
Type |
Name |
Description |
Double[] |
IP |
|
Returns
|
Improve this Doc
View Source
ClusterBinaryVectors(List<Double[]>, Int32, Double)
Declaration
public static Tuple<int[], List<double[]>> ClusterBinaryVectors(List<double[]> trainingData, int initialClusterCount, double vigilance)
Parameters
Returns
|
Improve this Doc
View Source
CountCommittedF2Nodes()
Declaration
public int CountCommittedF2Nodes()
Returns
|
Improve this Doc
View Source
DisplayClusterWeights(List<Double[]>, Int32[])
Need to allow for possibility that a wt vector = null.
Declaration
public static void DisplayClusterWeights(List<double[]> clusterWts, int[] clusterHits)
Parameters
|
Improve this Doc
View Source
GetClusterSpectrum(List<Double[]>)
Sums the weights over all the clusters.
Declaration
public static double[] GetClusterSpectrum(List<double[]> clusterWts)
Parameters
Type |
Name |
Description |
List<Double[]> |
clusterWts |
a list of wt vectors. Each weight corresponds to a compressed freq band.
|
Returns
Type |
Description |
Double[] |
a reduced spectrum of wts.
|
|
Improve this Doc
View Source
GetIndexOfFirstUncommittedNode()
returns -1 if all F2 nodes committed.
Declaration
public int GetIndexOfFirstUncommittedNode()
Returns
|
Improve this Doc
View Source
HammingSimilarity(Double[], Double[])
returns a value between 0-1
1- fractional Hamming Distance.
Declaration
public static double HammingSimilarity(double[] v1, double[] v2)
Parameters
Returns
|
Improve this Doc
View Source
IndexOfMaxF2Unit(Double[])
Declaration
public int IndexOfMaxF2Unit(double[] output)
Parameters
Type |
Name |
Description |
Double[] |
output |
|
Returns
|
Improve this Doc
View Source
InitialiseWtArrays(List<Double[]>, Int32[], Int32)
Initialise Uncommitted array := true
Initialize weight array.
Declaration
public void InitialiseWtArrays(List<double[]> trainingData, int[] randomIntegers, int initialClusterCount)
Parameters
|
Improve this Doc
View Source
PropagateIP2OP(Double[])
Only calculate ouputs for committed nodes. Output of uncommitted nodes = 0;
Output for any OP node = AND_OR_Similarity with input.
Output = 1 - fractional Hamming distance
= 1 - (hammingDistance / (double)this.IPSize).
Declaration
public double[] PropagateIP2OP(double[] IP)
Parameters
Type |
Name |
Description |
Double[] |
IP |
|
Returns
|
Improve this Doc
View Source
PruneClusters(List<Double[]>, Int32[], Double, Int32)
removes wtVectors from a list where two threshold conditions not satisfied:
- Sum of positive wts must exceed weight threshold
- Cluster size (i.e. total number of frames hit by wtVector) must exceed threshold.
Declaration
public static Tuple<int[], List<double[]>> PruneClusters(List<double[]> wtVectors, int[] clusterHits, double wtThreshold, int hitThreshold)
Parameters
Returns
|
Improve this Doc
View Source
PruneClusters2(List<Double[]>, Int32[], Double, Int32)
removes wtVectors from a list where three threshold conditions not satisfied
- Sum of positive wts must exceed threshold
- Cluster size (i.e. total frames hit by wtVector must exceed threshold
- All hits are isolated hits ie do not last more than one frame
returns 1) number of clusters remaining; and 2) percent isolated hits.
Declaration
public static Tuple<int, int> PruneClusters2(List<double[]> wtVectors, int[] clusterHits, double wtThreshold, int hitThreshold)
Parameters
Returns
|
Improve this Doc
View Source
SetParameterValues(Double, Double)
Declaration
public void SetParameterValues(double beta, double rho)
Parameters
|
Improve this Doc
View Source
TrainNet(List<Double[]>, Int32, Int32, Int32)
Declaration
public Tuple<int, int, int[], List<double[]>> TrainNet(List<double[]> trainingData, int maxIter, int seed, int initialWtCount)
Parameters
Returns
|
Improve this Doc
View Source
WriteParameters()
Declaration
public void WriteParameters()
Extension Methods