ols_mg.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2024, 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 
20 
21 #include <cumlprims/opg/matrix/data.hpp>
22 #include <cumlprims/opg/matrix/part_descriptor.hpp>
23 
24 namespace ML {
25 namespace OLS {
26 namespace opg {
27 
41 void fit(raft::handle_t& handle,
42  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
43  MLCommon::Matrix::PartDescriptor& input_desc,
44  std::vector<MLCommon::Matrix::Data<float>*>& labels,
45  float* coef,
46  float* intercept,
47  bool fit_intercept,
48  bool normalize,
49  int algo,
50  bool verbose);
51 
52 void fit(raft::handle_t& handle,
53  std::vector<MLCommon::Matrix::Data<double>*>& input_data,
54  MLCommon::Matrix::PartDescriptor& input_desc,
55  std::vector<MLCommon::Matrix::Data<double>*>& labels,
56  double* coef,
57  double* intercept,
58  bool fit_intercept,
59  bool normalize,
60  int algo,
61  bool verbose);
62 
76 void predict(raft::handle_t& handle,
77  MLCommon::Matrix::RankSizePair** rank_sizes,
78  size_t n_parts,
79  MLCommon::Matrix::Data<float>** input,
80  size_t n_rows,
81  size_t n_cols,
82  float* coef,
83  float intercept,
84  MLCommon::Matrix::Data<float>** preds,
85  bool verbose);
86 
87 void predict(raft::handle_t& handle,
88  MLCommon::Matrix::RankSizePair** rank_sizes,
89  size_t n_parts,
90  MLCommon::Matrix::Data<double>** input,
91  size_t n_rows,
92  size_t n_cols,
93  double* coef,
94  double intercept,
95  MLCommon::Matrix::Data<double>** preds,
96  bool verbose);
97 
98 }; // end namespace opg
99 }; // end namespace OLS
100 }; // end namespace ML
void normalize(value_t *data, value_idx n, size_t m, cudaStream_t stream)
Definition: utils.h:194
void predict(raft::handle_t &handle, MLCommon::Matrix::RankSizePair **rank_sizes, size_t n_parts, MLCommon::Matrix::Data< float > **input, size_t n_rows, size_t n_cols, float *coef, float intercept, MLCommon::Matrix::Data< float > **preds, bool verbose)
performs MNMG prediction for OLS
void fit(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, bool fit_intercept, bool normalize, int algo, bool verbose)
performs MNMG fit operation for the ridge regression
Definition: dbscan.hpp:30