ridge_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 
8 #include "glm.hpp"
9 
10 #include <cumlprims/opg/matrix/data.hpp>
11 #include <cumlprims/opg/matrix/part_descriptor.hpp>
12 
13 namespace ML {
14 namespace Ridge {
15 namespace opg {
16 
32 void fit(raft::handle_t& handle,
33  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
34  MLCommon::Matrix::PartDescriptor& input_desc,
35  std::vector<MLCommon::Matrix::Data<float>*>& labels,
36  float* alpha,
37  int n_alpha,
38  float* coef,
39  float* intercept,
40  bool fit_intercept,
41  bool normalize,
42  int algo,
43  bool verbose);
44 
45 void fit(raft::handle_t& handle,
46  std::vector<MLCommon::Matrix::Data<double>*>& input_data,
47  MLCommon::Matrix::PartDescriptor& input_desc,
48  std::vector<MLCommon::Matrix::Data<double>*>& labels,
49  double* alpha,
50  int n_alpha,
51  double* coef,
52  double* intercept,
53  bool fit_intercept,
54  bool normalize,
55  int algo,
56  bool verbose);
57 
71 void predict(raft::handle_t& handle,
72  MLCommon::Matrix::RankSizePair** rank_sizes,
73  size_t n_parts,
74  MLCommon::Matrix::Data<float>** input,
75  size_t n_rows,
76  size_t n_cols,
77  float* coef,
78  float intercept,
79  MLCommon::Matrix::Data<float>** preds,
80  bool verbose);
81 
82 void predict(raft::handle_t& handle,
83  MLCommon::Matrix::RankSizePair** rank_sizes,
84  size_t n_parts,
85  MLCommon::Matrix::Data<double>** input,
86  size_t n_rows,
87  size_t n_cols,
88  double* coef,
89  double intercept,
90  MLCommon::Matrix::Data<double>** preds,
91  bool verbose);
92 
93 }; // end namespace opg
94 }; // end namespace Ridge
95 }; // end namespace ML
void normalize(value_t *data, value_idx n, size_t m, cudaStream_t stream)
Definition: utils.h:177
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 *alpha, int n_alpha, float *coef, float *intercept, bool fit_intercept, bool normalize, int algo, bool verbose)
performs MNMG fit operation for the ridge regression
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
Definition: dbscan.hpp:18