C++ return array from function
I would like to implement machine learning algorithm in C++ without using any C++ machine learning library. So I'm writing this initializer function for generating zero matrices but can't figure out how can I accomplish this. I'm actually trying to write C++ code for simple logistics regression for now.
float * intializer_zero(int dimension){
// z = wx + b.
float b = 0;
float w[dimension]= { };
return w,b;
}
It's throwing error "cannot convert 'float' to 'float' in return." How can I write this initializer function in C++?
Topic weight-initialization c logistic-regression machine-learning
Category Data Science