Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/usnistgov/NFIQ2/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The NFIQ2::ModelInfo class contains information about a random forest parameter model used by the NFIQ2 Algorithm. This class provides metadata about the model including its name, version, trainer, and file path.

Class Definition

namespace NFIQ2 {
    class ModelInfo {
        // Public interface
    };
}

Constructors

Default Constructor

ModelInfo();
Default constructor.

File-based Constructor

ModelInfo(const std::string &modelInfoFilePath);
Constructor that loads model information from a file.
modelInfoFilePath
const std::string &
Path to model information file.

Methods

getModelName

std::string getModelName() const;
Obtain the model name.
return
std::string
Model name.

getModelTrainer

std::string getModelTrainer() const;
Obtain the entity that trained the random forest model.
return
std::string
Model trainer.

getModelDescription

std::string getModelDescription() const;
Obtain additional description information for model.
return
std::string
Model description.

getModelVersion

std::string getModelVersion() const;
Obtain the version number of the model.
return
std::string
Model version.

getModelPath

std::string getModelPath() const;
Obtain the file path of the model.
return
std::string
Model file path.

getModelHash

std::string getModelHash() const;
Obtain the md5 checksum of the model.
return
std::string
Model md5 checksum.

Constants

The class provides the following static constants for model information keys:

ModelInfoKeyName

static const char ModelInfoKeyName[];
Name key identifier.

ModelInfoKeyTrainer

static const char ModelInfoKeyTrainer[];
Trainer key identifier.

ModelInfoKeyDescription

static const char ModelInfoKeyDescription[];
Description key identifier.

ModelInfoKeyVersion

static const char ModelInfoKeyVersion[];
Version key identifier.

ModelInfoKeyPath

static const char ModelInfoKeyPath[];
Path key identifier.

ModelInfoKeyHash

static const char ModelInfoKeyHash[];
Hash key identifier.

Usage Example

#include <nfiq2_modelinfo.hpp>
#include <nfiq2_algorithm.hpp>

// Load model information from file
NFIQ2::ModelInfo modelInfo("/path/to/model_info.txt");

// Display model information
std::cout << "Model Name: " << modelInfo.getModelName() << std::endl;
std::cout << "Version: " << modelInfo.getModelVersion() << std::endl;
std::cout << "Trainer: " << modelInfo.getModelTrainer() << std::endl;
std::cout << "Description: " << modelInfo.getModelDescription() << std::endl;
std::cout << "Path: " << modelInfo.getModelPath() << std::endl;
std::cout << "Hash: " << modelInfo.getModelHash() << std::endl;

// Use ModelInfo to initialize Algorithm
NFIQ2::Algorithm algorithm(modelInfo);

Model Information File Format

The model information file typically contains key-value pairs for:
  • Name: Identifier for the model
  • Trainer: Organization or entity that trained the model
  • Description: Additional details about the model’s purpose or training data
  • Version: Version number of the model
  • Path: Location of the random forest parameter file
  • Hash: MD5 checksum for verifying model file integrity
The ModelInfo class is commonly used in conjunction with the Algorithm constructor to specify which random forest model to use for quality scoring.

See Also

  • Algorithm - Uses ModelInfo for initialization

Build docs developers (and LLMs) love