params.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cstdint>
20 
21 namespace ML {
22 
29 enum class solver : int {
30  COV_EIG_DQ,
32 };
33 
34 class params {
35  public:
36  std::size_t n_rows;
37  std::size_t n_cols;
38  int gpu_id = 0;
39 };
40 
41 class paramsSolver : public params {
42  public:
43  // math_t tol = 0.0;
44  float tol = 0.0;
45  std::uint32_t n_iterations = 15;
46  int verbose = 0;
47 };
48 
49 template <typename enum_solver = solver>
51  public:
52  std::size_t n_components = 1;
53  enum_solver algorithm = enum_solver::COV_EIG_DQ;
54 };
55 
74 template <typename enum_solver = solver>
75 class paramsPCATemplate : public paramsTSVDTemplate<enum_solver> {
76  public:
77  bool copy = true; // TODO unused, see #2830 and #2833
78  bool whiten = false;
79 };
80 
83 
85 
88 
89 }; // end namespace ML
structure for pca parameters. Ref: http://scikit-learn.org/stable/modules/generated/sklearn....
Definition: params.hpp:75
bool copy
Definition: params.hpp:77
bool whiten
Definition: params.hpp:78
Definition: params.hpp:41
float tol
Definition: params.hpp:44
int verbose
Definition: params.hpp:46
std::uint32_t n_iterations
Definition: params.hpp:45
Definition: params.hpp:50
enum_solver algorithm
Definition: params.hpp:53
std::size_t n_components
Definition: params.hpp:52
Definition: params.hpp:34
int gpu_id
Definition: params.hpp:38
std::size_t n_rows
Definition: params.hpp:36
std::size_t n_cols
Definition: params.hpp:37
Definition: dbscan.hpp:30
paramsPCATemplate paramsPCA
Definition: params.hpp:82
solver
Definition: params.hpp:29
mg_solver
Definition: params.hpp:84
paramsPCATemplate< mg_solver > paramsPCAMG
Definition: params.hpp:86
paramsTSVDTemplate paramsTSVD
Definition: params.hpp:81
paramsTSVDTemplate< mg_solver > paramsTSVDMG
Definition: params.hpp:87