Class KnnGraph<TItem, TDistance>.Parameters
This class provides some changing parameters for the KNN construction
Inheritance
System.Object
KnnGraph<TItem, TDistance>.Parameters
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.Collections.KNNGraph
Assembly: Mars.Common.dll
Syntax
[MessagePackObject(true)]
public class Parameters
Constructors
| Improve this Doc View SourceParameters()
Creates a new instance of the KnnGraph<TItem, TDistance>.Parameters
Declaration
public Parameters()
Properties
| Improve this Doc View SourceConstructionPruning
Gets or sets the number of candidates to consider as neighbours for
a given node at the graph construction phase.
Declaration
public int ConstructionPruning { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
EnableDistanceCacheForConstruction
Gets or sets a value indicating whether to cache calculated distances at graph construction time.
Declaration
public bool EnableDistanceCacheForConstruction { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ExpandBestSelection
Gets or sets a value indicating whether to expand candidates if
SelectHeuristic is used.
Declaration
public bool ExpandBestSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
InitialDistanceCacheSize
Gets or sets a the initial distance cache size.
Note: This value is reset to 0 on deserialization to avoid allocating the distance cache for pre-built graphs.
Declaration
public int InitialDistanceCacheSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
InitialItemsSize
Gets or sets a the initial size of the Items list
Declaration
public int InitialItemsSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
KeepPrunedConnections
Gets or sets a value indicating whether to keep pruned candidates if
SelectHeuristic is used.
Declaration
public bool KeepPrunedConnections { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Kind
Gets or sets parameter which specifies the type of heuristic to use for best neighbours selection.
Declaration
public SelectionKind Kind { get; set; }
Property Value
Type | Description |
---|---|
SelectionKind |
LevelLambda
Gets or sets the max level decay parameter. https://en.wikipedia.org/wiki/Exponential_distribution.
Declaration
public double LevelLambda { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M
Gets or sets the parameter which defines the maximum number of neighbors in the zero and above-zero layers.
The maximum number of neighbors for the zero layer is 2 * M.
The maximum number of neighbors for higher layers is M.
Declaration
public int M { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |