lars.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cuml/common/logger.hpp>
9 
10 #include <raft/core/handle.hpp>
11 
12 namespace ML {
13 namespace Solver {
14 namespace Lars {
15 
47 template <typename math_t, typename idx_t>
48 void larsFit(const raft::handle_t& handle,
49  math_t* X,
50  idx_t n_rows,
51  idx_t n_cols,
52  const math_t* y,
53  math_t* beta,
54  idx_t* active_idx,
55  math_t* alphas,
56  idx_t* n_active,
57  math_t* Gram,
58  int max_iter,
59  math_t* coef_path,
60  rapids_logger::level_enum verbosity,
61  idx_t ld_X,
62  idx_t ld_G,
63  math_t eps);
64 
82 template <typename math_t, typename idx_t>
83 void larsPredict(const raft::handle_t& handle,
84  const math_t* X,
85  idx_t n_rows,
86  idx_t n_cols,
87  idx_t ld_X,
88  const math_t* beta,
89  idx_t n_active,
90  idx_t* active_idx,
91  math_t intercept,
92  math_t* preds);
93 }; // namespace Lars
94 }; // namespace Solver
95 }; // end namespace ML
void larsFit(const raft::handle_t &handle, math_t *X, idx_t n_rows, idx_t n_cols, const math_t *y, math_t *beta, idx_t *active_idx, math_t *alphas, idx_t *n_active, math_t *Gram, int max_iter, math_t *coef_path, rapids_logger::level_enum verbosity, idx_t ld_X, idx_t ld_G, math_t eps)
Train a regressor using LARS method.
void larsPredict(const raft::handle_t &handle, const math_t *X, idx_t n_rows, idx_t n_cols, idx_t ld_X, const math_t *beta, idx_t n_active, idx_t *active_idx, math_t intercept, math_t *preds)
Predict with LARS regressor.
Definition: dbscan.hpp:18