6
6
7
7
using namespace Rcpp ;
8
8
9
- // get_ftrl_weights
10
- NumericVector get_ftrl_weights (const List& R_model);
11
- RcppExport SEXP _rsparse_get_ftrl_weights (SEXP R_modelSEXP) {
12
- BEGIN_RCPP
13
- Rcpp::RObject rcpp_result_gen;
14
- Rcpp::RNGScope rcpp_rngScope_gen;
15
- Rcpp::traits::input_parameter< const List& >::type R_model (R_modelSEXP);
16
- rcpp_result_gen = Rcpp::wrap (get_ftrl_weights (R_model));
17
- return rcpp_result_gen;
18
- END_RCPP
19
- }
20
- // ftrl_partial_fit
21
- NumericVector ftrl_partial_fit (const S4& m, const NumericVector& y, const List& R_model, const NumericVector& weights, int do_update, int n_threads);
22
- RcppExport SEXP _rsparse_ftrl_partial_fit (SEXP mSEXP , SEXP ySEXP, SEXP R_modelSEXP, SEXP weightsSEXP, SEXP do_updateSEXP, SEXP n_threadsSEXP) {
23
- BEGIN_RCPP
24
- Rcpp::RObject rcpp_result_gen;
25
- Rcpp::RNGScope rcpp_rngScope_gen;
26
- Rcpp::traits::input_parameter< const S4& >::type m (mSEXP );
27
- Rcpp::traits::input_parameter< const NumericVector& >::type y (ySEXP);
28
- Rcpp::traits::input_parameter< const List& >::type R_model (R_modelSEXP);
29
- Rcpp::traits::input_parameter< const NumericVector& >::type weights (weightsSEXP);
30
- Rcpp::traits::input_parameter< int >::type do_update (do_updateSEXP);
31
- Rcpp::traits::input_parameter< int >::type n_threads (n_threadsSEXP);
32
- rcpp_result_gen = Rcpp::wrap (ftrl_partial_fit (m, y, R_model, weights, do_update, n_threads));
33
- return rcpp_result_gen;
34
- END_RCPP
35
- }
36
9
// fm_create_param
37
10
SEXP fm_create_param (float learning_rate_w, float learning_rate_v, int rank, float lambda_w, float lambda_v, Rcpp::IntegerVector& w0_R, Rcpp::IntegerVector& w_R, Rcpp::IntegerMatrix& v_R, Rcpp::IntegerVector& grad_w2_R, Rcpp::IntegerMatrix& grad_v2_R, const Rcpp::String task, int intercept);
38
11
RcppExport SEXP _rsparse_fm_create_param (SEXP learning_rate_wSEXP, SEXP learning_rate_vSEXP, SEXP rankSEXP, SEXP lambda_wSEXP, SEXP lambda_vSEXP, SEXP w0_RSEXP, SEXP w_RSEXP, SEXP v_RSEXP, SEXP grad_w2_RSEXP, SEXP grad_v2_RSEXP, SEXP taskSEXP, SEXP interceptSEXP) {
@@ -137,6 +110,49 @@ BEGIN_RCPP
137
110
return rcpp_result_gen;
138
111
END_RCPP
139
112
}
113
+ // get_ftrl_weights
114
+ NumericVector get_ftrl_weights (const List& R_model);
115
+ RcppExport SEXP _rsparse_get_ftrl_weights (SEXP R_modelSEXP) {
116
+ BEGIN_RCPP
117
+ Rcpp::RObject rcpp_result_gen;
118
+ Rcpp::RNGScope rcpp_rngScope_gen;
119
+ Rcpp::traits::input_parameter< const List& >::type R_model (R_modelSEXP);
120
+ rcpp_result_gen = Rcpp::wrap (get_ftrl_weights (R_model));
121
+ return rcpp_result_gen;
122
+ END_RCPP
123
+ }
124
+ // ftrl_partial_fit
125
+ NumericVector ftrl_partial_fit (const S4& m, const NumericVector& y, const List& R_model, const NumericVector& weights, int do_update, int n_threads);
126
+ RcppExport SEXP _rsparse_ftrl_partial_fit (SEXP mSEXP , SEXP ySEXP, SEXP R_modelSEXP, SEXP weightsSEXP, SEXP do_updateSEXP, SEXP n_threadsSEXP) {
127
+ BEGIN_RCPP
128
+ Rcpp::RObject rcpp_result_gen;
129
+ Rcpp::RNGScope rcpp_rngScope_gen;
130
+ Rcpp::traits::input_parameter< const S4& >::type m (mSEXP );
131
+ Rcpp::traits::input_parameter< const NumericVector& >::type y (ySEXP);
132
+ Rcpp::traits::input_parameter< const List& >::type R_model (R_modelSEXP);
133
+ Rcpp::traits::input_parameter< const NumericVector& >::type weights (weightsSEXP);
134
+ Rcpp::traits::input_parameter< int >::type do_update (do_updateSEXP);
135
+ Rcpp::traits::input_parameter< int >::type n_threads (n_threadsSEXP);
136
+ rcpp_result_gen = Rcpp::wrap (ftrl_partial_fit (m, y, R_model, weights, do_update, n_threads));
137
+ return rcpp_result_gen;
138
+ END_RCPP
139
+ }
140
+ // arma_kmeans
141
+ int arma_kmeans (const arma::dmat& x, const int k, const int seed_mode, const int n_iter, bool verbose, Rcpp::NumericMatrix& result);
142
+ RcppExport SEXP _rsparse_arma_kmeans (SEXP xSEXP, SEXP kSEXP , SEXP seed_modeSEXP, SEXP n_iterSEXP, SEXP verboseSEXP, SEXP resultSEXP) {
143
+ BEGIN_RCPP
144
+ Rcpp::RObject rcpp_result_gen;
145
+ Rcpp::RNGScope rcpp_rngScope_gen;
146
+ Rcpp::traits::input_parameter< const arma::dmat& >::type x (xSEXP);
147
+ Rcpp::traits::input_parameter< const int >::type k (kSEXP );
148
+ Rcpp::traits::input_parameter< const int >::type seed_mode (seed_modeSEXP);
149
+ Rcpp::traits::input_parameter< const int >::type n_iter (n_iterSEXP);
150
+ Rcpp::traits::input_parameter< bool >::type verbose (verboseSEXP);
151
+ Rcpp::traits::input_parameter< Rcpp::NumericMatrix& >::type result (resultSEXP);
152
+ rcpp_result_gen = Rcpp::wrap (arma_kmeans (x, k, seed_mode, n_iter, verbose, result));
153
+ return rcpp_result_gen;
154
+ END_RCPP
155
+ }
140
156
// csr_dense_tcrossprod
141
157
Rcpp::NumericMatrix csr_dense_tcrossprod (const Rcpp::S4& x_csr_r, const arma::Mat<double >& y_transposed, int num_threads);
142
158
RcppExport SEXP _rsparse_csr_dense_tcrossprod (SEXP x_csr_rSEXP, SEXP y_transposedSEXP, SEXP num_threadsSEXP) {
@@ -163,6 +179,16 @@ BEGIN_RCPP
163
179
return rcpp_result_gen;
164
180
END_RCPP
165
181
}
182
+ // omp_thread_count
183
+ int omp_thread_count ();
184
+ RcppExport SEXP _rsparse_omp_thread_count () {
185
+ BEGIN_RCPP
186
+ Rcpp::RObject rcpp_result_gen;
187
+ Rcpp::RNGScope rcpp_rngScope_gen;
188
+ rcpp_result_gen = Rcpp::wrap (omp_thread_count ());
189
+ return rcpp_result_gen;
190
+ END_RCPP
191
+ }
166
192
// als_implicit_double
167
193
double als_implicit_double (const Rcpp::S4& m_csc_r, arma::mat& X, arma::mat& Y, double lambda, unsigned n_threads, unsigned solver, unsigned cg_steps);
168
194
RcppExport SEXP _rsparse_als_implicit_double (SEXP m_csc_rSEXP, SEXP XSEXP, SEXP YSEXP, SEXP lambdaSEXP, SEXP n_threadsSEXP, SEXP solverSEXP, SEXP cg_stepsSEXP) {
@@ -228,32 +254,6 @@ BEGIN_RCPP
228
254
return rcpp_result_gen;
229
255
END_RCPP
230
256
}
231
- // arma_kmeans
232
- int arma_kmeans (const arma::dmat& x, const int k, const int seed_mode, const int n_iter, bool verbose, Rcpp::NumericMatrix& result);
233
- RcppExport SEXP _rsparse_arma_kmeans (SEXP xSEXP, SEXP kSEXP , SEXP seed_modeSEXP, SEXP n_iterSEXP, SEXP verboseSEXP, SEXP resultSEXP) {
234
- BEGIN_RCPP
235
- Rcpp::RObject rcpp_result_gen;
236
- Rcpp::RNGScope rcpp_rngScope_gen;
237
- Rcpp::traits::input_parameter< const arma::dmat& >::type x (xSEXP);
238
- Rcpp::traits::input_parameter< const int >::type k (kSEXP );
239
- Rcpp::traits::input_parameter< const int >::type seed_mode (seed_modeSEXP);
240
- Rcpp::traits::input_parameter< const int >::type n_iter (n_iterSEXP);
241
- Rcpp::traits::input_parameter< bool >::type verbose (verboseSEXP);
242
- Rcpp::traits::input_parameter< Rcpp::NumericMatrix& >::type result (resultSEXP);
243
- rcpp_result_gen = Rcpp::wrap (arma_kmeans (x, k, seed_mode, n_iter, verbose, result));
244
- return rcpp_result_gen;
245
- END_RCPP
246
- }
247
- // omp_thread_count
248
- int omp_thread_count ();
249
- RcppExport SEXP _rsparse_omp_thread_count () {
250
- BEGIN_RCPP
251
- Rcpp::RObject rcpp_result_gen;
252
- Rcpp::RNGScope rcpp_rngScope_gen;
253
- rcpp_result_gen = Rcpp::wrap (omp_thread_count ());
254
- return rcpp_result_gen;
255
- END_RCPP
256
- }
257
257
// cpp_make_sparse_approximation
258
258
Rcpp::NumericVector cpp_make_sparse_approximation (const Rcpp::S4& mat_template, arma::mat& X, arma::mat& Y, int sparse_matrix_type, unsigned n_threads);
259
259
RcppExport SEXP _rsparse_cpp_make_sparse_approximation (SEXP mat_templateSEXP, SEXP XSEXP, SEXP YSEXP, SEXP sparse_matrix_typeSEXP, SEXP n_threadsSEXP) {
@@ -282,8 +282,6 @@ END_RCPP
282
282
}
283
283
284
284
static const R_CallMethodDef CallEntries[] = {
285
- {" _rsparse_get_ftrl_weights" , (DL_FUNC) &_rsparse_get_ftrl_weights, 1 },
286
- {" _rsparse_ftrl_partial_fit" , (DL_FUNC) &_rsparse_ftrl_partial_fit, 6 },
287
285
{" _rsparse_fm_create_param" , (DL_FUNC) &_rsparse_fm_create_param, 12 },
288
286
{" _rsparse_fm_create_model" , (DL_FUNC) &_rsparse_fm_create_model, 1 },
289
287
{" _rsparse_fill_float_matrix_randn" , (DL_FUNC) &_rsparse_fill_float_matrix_randn, 2 },
@@ -292,14 +290,16 @@ static const R_CallMethodDef CallEntries[] = {
292
290
{" _rsparse_fill_float_vector" , (DL_FUNC) &_rsparse_fill_float_vector, 2 },
293
291
{" _rsparse_fm_partial_fit" , (DL_FUNC) &_rsparse_fm_partial_fit, 6 },
294
292
{" _rsparse_is_invalid_ptr" , (DL_FUNC) &_rsparse_is_invalid_ptr, 1 },
293
+ {" _rsparse_get_ftrl_weights" , (DL_FUNC) &_rsparse_get_ftrl_weights, 1 },
294
+ {" _rsparse_ftrl_partial_fit" , (DL_FUNC) &_rsparse_ftrl_partial_fit, 6 },
295
+ {" _rsparse_arma_kmeans" , (DL_FUNC) &_rsparse_arma_kmeans, 6 },
295
296
{" _rsparse_csr_dense_tcrossprod" , (DL_FUNC) &_rsparse_csr_dense_tcrossprod, 3 },
296
297
{" _rsparse_dense_csc_prod" , (DL_FUNC) &_rsparse_dense_csc_prod, 3 },
298
+ {" _rsparse_omp_thread_count" , (DL_FUNC) &_rsparse_omp_thread_count, 0 },
297
299
{" _rsparse_als_implicit_double" , (DL_FUNC) &_rsparse_als_implicit_double, 7 },
298
300
{" _rsparse_als_implicit_float" , (DL_FUNC) &_rsparse_als_implicit_float, 7 },
299
301
{" _rsparse_als_loss_explicit" , (DL_FUNC) &_rsparse_als_loss_explicit, 5 },
300
302
{" _rsparse_top_product" , (DL_FUNC) &_rsparse_top_product, 6 },
301
- {" _rsparse_arma_kmeans" , (DL_FUNC) &_rsparse_arma_kmeans, 6 },
302
- {" _rsparse_omp_thread_count" , (DL_FUNC) &_rsparse_omp_thread_count, 0 },
303
303
{" _rsparse_cpp_make_sparse_approximation" , (DL_FUNC) &_rsparse_cpp_make_sparse_approximation, 5 },
304
304
{" _rsparse_arma_svd_econ" , (DL_FUNC) &_rsparse_arma_svd_econ, 1 },
305
305
{NULL , NULL , 0 }
0 commit comments