umappp
A C++ library for UMAP
Loading...
Searching...
No Matches
Options.hpp
Go to the documentation of this file.
1#ifndef UMAPPP_OPTIONS_HPP
2#define UMAPPP_OPTIONS_HPP
3
4#include <random>
5#include <optional>
6
7#include "sanisizer/sanisizer.hpp"
8
14namespace umappp {
15
23enum InitializeMethod : char { SPECTRAL, RANDOM, NONE };
24
28typedef std::mt19937_64 RngEngine;
29
33struct Options {
40
45 double bandwidth = 1;
46
53 double mix_ratio = 1;
54
58 double spread = 1;
59
65 double min_dist = 0.1;
66
73 double a = 0;
74
81 double b = 0;
82
88
92 InitializeMethod initialize_method = InitializeMethod::SPECTRAL;
93
100
108
115
121
127
133 typename RngEngine::result_type initialize_seed = sanisizer::cap<typename RngEngine::result_type>(9876543210);
134
144 std::optional<int> num_epochs;
145
150 double learning_rate = 1;
151
158
165
169 typename RngEngine::result_type optimize_seed = sanisizer::cap<typename RngEngine::result_type>(1234567890);
170
178 int num_threads = 1;
179
194};
195
196}
197
198#endif
Methods for UMAP.
Definition initialize.hpp:22
InitializeMethod
Definition Options.hpp:23
std::mt19937_64 RngEngine
Definition Options.hpp:28
Options for initialize().
Definition Options.hpp:33
double initialize_random_scale
Definition Options.hpp:126
double mix_ratio
Definition Options.hpp:53
double negative_sample_rate
Definition Options.hpp:157
double repulsion_strength
Definition Options.hpp:87
RngEngine::result_type optimize_seed
Definition Options.hpp:169
int parallel_optimization
Definition Options.hpp:193
bool initialize_spectral_jitter
Definition Options.hpp:114
InitializeMethod initialize_method
Definition Options.hpp:92
double bandwidth
Definition Options.hpp:45
double min_dist
Definition Options.hpp:65
double learning_rate
Definition Options.hpp:150
std::optional< int > num_epochs
Definition Options.hpp:144
double initialize_spectral_jitter_sd
Definition Options.hpp:120
double b
Definition Options.hpp:81
int num_neighbors
Definition Options.hpp:164
double a
Definition Options.hpp:73
double spread
Definition Options.hpp:58
int num_threads
Definition Options.hpp:178
RngEngine::result_type initialize_seed
Definition Options.hpp:133
bool initialize_random_on_spectral_fail
Definition Options.hpp:99
double local_connectivity
Definition Options.hpp:39
double initialize_spectral_scale
Definition Options.hpp:107