preprocess_mg.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-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 <cumlprims/opg/matrix/data.hpp>
20 #include <cumlprims/opg/matrix/part_descriptor.hpp>
21 #include <raft/core/comms.hpp>
22 #include <raft/core/handle.hpp>
23 
24 namespace ML {
25 namespace GLM {
26 namespace opg {
27 
28 void preProcessData(raft::handle_t& handle,
29  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
30  MLCommon::Matrix::PartDescriptor& input_desc,
31  std::vector<MLCommon::Matrix::Data<float>*>& labels,
32  float* mu_input,
33  float* mu_labels,
34  float* norm2_input,
35  bool fit_intercept,
36  bool normalize,
37  cudaStream_t* streams,
38  int n_streams,
39  bool verbose);
40 
41 void preProcessData(raft::handle_t& handle,
42  std::vector<MLCommon::Matrix::Data<double>*>& input_data,
43  MLCommon::Matrix::PartDescriptor& input_desc,
44  std::vector<MLCommon::Matrix::Data<double>*>& labels,
45  double* mu_input,
46  double* mu_labels,
47  double* norm2_input,
48  bool fit_intercept,
49  bool normalize,
50  cudaStream_t* streams,
51  int n_streams,
52  bool verbose);
53 
54 void postProcessData(raft::handle_t& handle,
55  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
56  MLCommon::Matrix::PartDescriptor& input_desc,
57  std::vector<MLCommon::Matrix::Data<float>*>& labels,
58  float* coef,
59  float* intercept,
60  float* mu_input,
61  float* mu_labels,
62  float* norm2_input,
63  bool fit_intercept,
64  bool normalize,
65  cudaStream_t* streams,
66  int n_streams,
67  bool verbose);
68 
69 void postProcessData(raft::handle_t& handle,
70  std::vector<MLCommon::Matrix::Data<double>*>& input_data,
71  MLCommon::Matrix::PartDescriptor& input_desc,
72  std::vector<MLCommon::Matrix::Data<double>*>& labels,
73  double* coef,
74  double* intercept,
75  double* mu_input,
76  double* mu_labels,
77  double* norm2_input,
78  bool fit_intercept,
79  bool normalize,
80  cudaStream_t* streams,
81  int n_streams,
82  bool verbose);
83 
84 }; // end namespace opg
85 }; // namespace GLM
86 }; // end namespace ML
void postProcessData(raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< float > * > &labels, float *coef, float *intercept, float *mu_input, float *mu_labels, float *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
void preProcessData(raft::handle_t &handle, std::vector< MLCommon::Matrix::Data< float > * > &input_data, MLCommon::Matrix::PartDescriptor &input_desc, std::vector< MLCommon::Matrix::Data< float > * > &labels, float *mu_input, float *mu_labels, float *norm2_input, bool fit_intercept, bool normalize, cudaStream_t *streams, int n_streams, bool verbose)
void normalize(value_t *data, value_idx n, size_t m, cudaStream_t stream)
Definition: utils.h:194
Definition: dbscan.hpp:30