ols_mg.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2024, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
9 
10 #include <cumlprims/opg/matrix/data.hpp>
11 #include <cumlprims/opg/matrix/part_descriptor.hpp>
12 
13 namespace ML {
14 namespace OLS {
15 namespace opg {
16 
30 void fit(raft::handle_t& handle,
31  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
32  MLCommon::Matrix::PartDescriptor& input_desc,
33  std::vector<MLCommon::Matrix::Data<float>*>& labels,
34  float* coef,
35  float* intercept,
36  bool fit_intercept,
37  bool normalize,
38  int algo,
39  bool verbose);
40 
41 void fit(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* coef,
46  double* intercept,
47  bool fit_intercept,
48  bool normalize,
49  int algo,
50  bool verbose);
51 
65 void predict(raft::handle_t& handle,
66  MLCommon::Matrix::RankSizePair** rank_sizes,
67  size_t n_parts,
68  MLCommon::Matrix::Data<float>** input,
69  size_t n_rows,
70  size_t n_cols,
71  float* coef,
72  float intercept,
73  MLCommon::Matrix::Data<float>** preds,
74  bool verbose);
75 
76 void predict(raft::handle_t& handle,
77  MLCommon::Matrix::RankSizePair** rank_sizes,
78  size_t n_parts,
79  MLCommon::Matrix::Data<double>** input,
80  size_t n_rows,
81  size_t n_cols,
82  double* coef,
83  double intercept,
84  MLCommon::Matrix::Data<double>** preds,
85  bool verbose);
86 
87 }; // end namespace opg
88 }; // end namespace OLS
89 }; // end namespace ML
void normalize(value_t *data, value_idx n, size_t m, cudaStream_t stream)
Definition: utils.h:177
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:18