Loading [MathJax]/extensions/tex2jax.js
cuML C++ API  23.12
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ols_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 
20 #include <cumlprims/opg/matrix/data.hpp>
21 #include <cumlprims/opg/matrix/part_descriptor.hpp>
22 
23 namespace ML {
24 namespace OLS {
25 namespace opg {
26 
40 void fit(raft::handle_t& handle,
41  std::vector<MLCommon::Matrix::Data<float>*>& input_data,
42  MLCommon::Matrix::PartDescriptor& input_desc,
43  std::vector<MLCommon::Matrix::Data<float>*>& labels,
44  float* coef,
45  float* intercept,
46  bool fit_intercept,
47  bool normalize,
48  int algo,
49  bool verbose);
50 
51 void fit(raft::handle_t& handle,
52  std::vector<MLCommon::Matrix::Data<double>*>& input_data,
53  MLCommon::Matrix::PartDescriptor& input_desc,
54  std::vector<MLCommon::Matrix::Data<double>*>& labels,
55  double* coef,
56  double* intercept,
57  bool fit_intercept,
58  bool normalize,
59  int algo,
60  bool verbose);
61 
75 void predict(raft::handle_t& handle,
76  MLCommon::Matrix::RankSizePair** rank_sizes,
77  size_t n_parts,
78  MLCommon::Matrix::Data<float>** input,
79  size_t n_rows,
80  size_t n_cols,
81  float* coef,
82  float intercept,
83  MLCommon::Matrix::Data<float>** preds,
84  bool verbose);
85 
86 void predict(raft::handle_t& handle,
87  MLCommon::Matrix::RankSizePair** rank_sizes,
88  size_t n_parts,
89  MLCommon::Matrix::Data<double>** input,
90  size_t n_rows,
91  size_t n_cols,
92  double* coef,
93  double intercept,
94  MLCommon::Matrix::Data<double>** preds,
95  bool verbose);
96 
97 }; // end namespace opg
98 }; // end namespace OLS
99 }; // end namespace ML
void normalize(value_t *data, value_idx n, size_t m, cudaStream_t stream)
Definition: utils.h:196
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:27