BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
kmeans_landmark.h
Go to the documentation of this file.
1/* This file is part of BlosSOM.
2 *
3 * Copyright (C) 2021 Mirek Kratochvil
4 *
5 * BlosSOM is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free
7 * Software Foundation, either version 3 of the License, or (at your option)
8 * any later version.
9 *
10 * BlosSOM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * BlosSOM. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef KMEANS_LANDMARK_H
20#define KMEANS_LANDMARK_H
21
22#include <random>
23#include <vector>
24
25#include "landmark_model.h"
26#include "scaled_data.h"
27
28/** Structure for storing the kmeans-style data */
30{
31 /** Random engine for picking the points for training. */
32 std::default_random_engine gen;
33};
34
35/** Run a k-means-like optimization of high-dimensional landmark positions */
36void
38 const ScaledData &model,
39 size_t iters,
40 float alpha,
41 float neighbor_alpha,
42 LandmarkModel &lm);
43
44/** Run a SOM to optimize high-dimensional landmark positions. */
45void
47 const ScaledData &model,
48 size_t iters,
49 float alpha,
50 float sigma,
51 LandmarkModel &lm);
52
53#endif
void som_landmark_step(KMeansData &data, const ScaledData &model, size_t iters, float alpha, float sigma, LandmarkModel &lm)
Run a SOM to optimize high-dimensional landmark positions.
void kmeans_landmark_step(KMeansData &data, const ScaledData &model, size_t iters, float alpha, float neighbor_alpha, LandmarkModel &lm)
Run a k-means-like optimization of high-dimensional landmark positions.
Structure for storing the kmeans-style data.
std::default_random_engine gen
Random engine for picking the points for training.
Model of the high- and low-dimensional landmarks.
Storage of the scaled data.
Definition: scaled_data.h:53