| AutotunedIndexParams Constructor (Single, Single, Single, Single) |
Namespace:
OpenCvSharp.Flann
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public AutotunedIndexParams(
float targetPrecision = 0.9f,
float buildWeight = 0.01f,
float memoryWeight = 0f,
float sampleFraction = 0.1f
)
Public Sub New (
Optional targetPrecision As Single = 0.9F,
Optional buildWeight As Single = 0.01F,
Optional memoryWeight As Single = 0F,
Optional sampleFraction As Single = 0.1F
)
public:
AutotunedIndexParams(
float targetPrecision = 0.9f,
float buildWeight = 0.01f,
float memoryWeight = 0f,
float sampleFraction = 0.1f
)
new :
?targetPrecision : float32 *
?buildWeight : float32 *
?memoryWeight : float32 *
?sampleFraction : float32
(* Defaults:
let _targetPrecision = defaultArg targetPrecision 0.9f
let _buildWeight = defaultArg buildWeight 0.01f
let _memoryWeight = defaultArg memoryWeight 0f
let _sampleFraction = defaultArg sampleFraction 0.1f
*)
-> AutotunedIndexParams
Parameters
- targetPrecision (Optional)
- Type: SystemSingle
Is a number between 0 and 1 specifying the percentage of the approximate nearest-neighbor searches that return the exact nearest-neighbor.
Using a higher value for this parameter gives more accurate results, but the search takes longer. The optimum value usually depends on the application. - buildWeight (Optional)
- Type: SystemSingle
Specifies the importance of the index build time raported to the nearest-neighbor search time.
In some applications it’s acceptable for the index build step to take a long time if the subsequent searches in the index can be performed very fast.
In other applications it’s required that the index be build as fast as possible even if that leads to slightly longer search times. - memoryWeight (Optional)
- Type: SystemSingle
Is used to specify the tradeoff between time (index build time and search time) and memory used by the index.
A value less than 1 gives more importance to the time spent and a value greater than 1 gives more importance to the memory usage. - sampleFraction (Optional)
- Type: SystemSingle
Is a number between 0 and 1 indicating what fraction of the dataset to use in the automatic parameter configuration algorithm.
Running the algorithm on the full dataset gives the most accurate results, but for very large datasets can take longer than desired.
In such case using just a fraction of the data helps speeding up this algorithm while still giving good approximations of the optimum parameters.
See Also