make_regression.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-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 
19 #include <cstdint>
20 
21 namespace raft {
22 class handle_t;
23 }
24 
25 namespace ML {
26 namespace Datasets {
27 
58 void make_regression(const raft::handle_t& handle,
59  float* out,
60  float* values,
61  int64_t n_rows,
62  int64_t n_cols,
63  int64_t n_informative,
64  float* coef = nullptr,
65  int64_t n_targets = 1LL,
66  float bias = 0.0f,
67  int64_t effective_rank = -1LL,
68  float tail_strength = 0.5f,
69  float noise = 0.0f,
70  bool shuffle = true,
71  uint64_t seed = 0ULL);
72 
73 void make_regression(const raft::handle_t& handle,
74  double* out,
75  double* values,
76  int64_t n_rows,
77  int64_t n_cols,
78  int64_t n_informative,
79  double* coef = nullptr,
80  int64_t n_targets = 1LL,
81  double bias = 0.0,
82  int64_t effective_rank = -1LL,
83  double tail_strength = 0.5,
84  double noise = 0.0,
85  bool shuffle = true,
86  uint64_t seed = 0ULL);
87 
88 void make_regression(const raft::handle_t& handle,
89  float* out,
90  float* values,
91  int n_rows,
92  int n_cols,
93  int n_informative,
94  float* coef = nullptr,
95  int n_targets = 1LL,
96  float bias = 0.0f,
97  int effective_rank = -1LL,
98  float tail_strength = 0.5f,
99  float noise = 0.0f,
100  bool shuffle = true,
101  uint64_t seed = 0ULL);
102 
103 void make_regression(const raft::handle_t& handle,
104  double* out,
105  double* values,
106  int n_rows,
107  int n_cols,
108  int n_informative,
109  double* coef = nullptr,
110  int n_targets = 1LL,
111  double bias = 0.0,
112  int effective_rank = -1LL,
113  double tail_strength = 0.5,
114  double noise = 0.0,
115  bool shuffle = true,
116  uint64_t seed = 0ULL);
117 
118 } // namespace Datasets
119 } // namespace ML
void make_regression(const raft::handle_t &handle, float *out, float *values, int64_t n_rows, int64_t n_cols, int64_t n_informative, float *coef=nullptr, int64_t n_targets=1LL, float bias=0.0f, int64_t effective_rank=-1LL, float tail_strength=0.5f, float noise=0.0f, bool shuffle=true, uint64_t seed=0ULL)
GPU-equivalent of sklearn.datasets.make_regression as documented at: https://scikit-learn....
void shuffle(std::vector< math_t > &rand_indices, std::mt19937 &g)
Definition: shuffle.h:35
Definition: dbscan.hpp:30
Definition: dbscan.hpp:26