# Package com.tibco.patterns.learn.api.project

The main package to support Patterns Learn projects and automated model training. ProjectFiles class manages all files in the project directory. It creates or loads one project.xml and a number of model.xml files, and returns objects of ProjectSettings and ModelSettings for the respective XML files. All model training functionality for a specific ModelSettings object is implemented by ModelTrainer class.

The package also contains a number of classes that support individual data structures required for Patterns Learn projects, such as DataPartition, DatasetResult, RecPair and RecPairMap.

- Class Summary
  Class | Description
  --- | ---
  AddPairsResult | Contains sets of pairs that were added to each dataset, and collections of pairs that were not added to the project for various reasons.
  DatasetResult | Stores model training results for one dataset.
  FieldStats | Stores statistics for one table field.
  ModelSettings | Stores all settings for a single Patterns Learn model.xml file.
  ModelTrainConfig | Defines configuration for creating and training a Learn model.
  ModelTrainer | Functionality to communicate with Patterns server, load data table, calculate feature scores, train and evaluate model.
  ProjectFiles | Manages all files for one Patterns Learn project.
  ProjectSettings | Stores all settings for a single Patterns Learn project.xml file.
  RecPair | Stores information about one record pair, including field values, feature scores and label.
  RecPair.ConfScoreComparator | Provides ordering by a combination (weighted sum) of the prediction confidence (ascending) and the distance of the model score from the 0.5 threshold (ascending).
  RecPairMap | Manages datasets in the XML structure in sync with a map of all record pairs that are stored in these datasets.
  ValueFreq | Stores one field value and its frequency.

- Enum Summary
  Enum | Description
  --- | ---
  DataPartition | Defines the type of a dataset: Training, Validation, Test, Reserve, Low Confidence, False Subsets.
  RecPair.Label | Defines a label that can be assigned to a record pair: True, False or Unsure.