TriMAP<T>
Models & Types ยท AiDotNet.Preprocessing.DimensionalityReduction
TriMAP: Large-scale Dimensionality Reduction Using Triplets.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ TriMAP<T>
For Beginners
TriMAP preserves distance relationships using triplets:
- A triplet (i, j, k) means point i is closer to j than to k
- Optimization ensures these relationships hold in the embedding
- More accurate than t-SNE/UMAP for many datasets
- Less sensitive to parameter tuning
Use cases:
- Large-scale visualization (millions of points)
- When t-SNE/UMAP produces poor results
- When you need faithful global structure
- Complex datasets with hierarchical structure
How It Works
TriMAP is a dimensionality reduction method that uses triplet constraints to preserve both local and global structure. It outperforms t-SNE and UMAP on many datasets while being more robust to hyperparameter choices.
The algorithm:
- Generate triplets (anchor, positive, negative) based on distance relationships
- Initialize embedding using PCA
- Optimize using triplet loss to preserve distance rankings
- Weight triplets to balance local and global structure
Constructors
| Constructor | Summary |
|---|---|
TriMAP(int nComponents, int nInliers, int nOutliers, int nRandom, int nIter, double learningRate, int? randomState, int[] columnIndices) |
Creates a new instance of TriMAP. |
Properties
| Property | Summary |
|---|---|
Matrix<T> Embedding { get; } |
Gets the embedding result. |
bool SupportsInverseTransform { get; } |
Gets whether this transformer supports inverse transformation. |
int NComponents { get; } |
Gets the number of components (dimensions). |
Methods
| Method | Summary |
|---|---|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
Gets the output feature names after transformation. |