In SGObject.h:
class CSGObject {
...
private:
...
struct Self;
DPtr<Self> self;
...
}
require 'modshogun' | |
f_feats_train = Modshogun::CSVFile.new "../../data/classifier_binary_2d_nonlinear_features_train.dat" | |
f_feats_test = Modshogun::CSVFile.new "../../data/classifier_binary_2d_nonlinear_features_test.dat" | |
f_labels_train = Modshogun::CSVFile.new "../../data/classifier_binary_2d_nonlinear_labels_train.dat" | |
f_labels_test = Modshogun::CSVFile.new "../../data/classifier_binary_2d_nonlinear_labels_test.dat" | |
#![create_features] | |
features_train = Modshogun::RealFeatures.new f_feats_train | |
features_test = Modshogun::RealFeatures.new f_feats_test |
// loadLibrary has SG_INFO("Loaded.\n"); | |
int main() | |
{ | |
init_shogun_with_defaults(); | |
SGIO *io = get_global_io(); | |
io->set_target_to_stdout(); | |
auto library = shogun::loadLibrary("/home/sanuj/Projects/shogun/buildcpp/tests/unit/libplugin.so"); | |
auto manifest = library.manifest(); | |
auto metaclass = manifest.classByName<MockBaseClass>("m_class"); |
[ 1%] [ 1%] Built target HeadersProtobuf | |
Generating version header | |
[ 1%] Built target ShogunVersionProtobuf | |
[ 1%] Built target ChunksProtobuf | |
[ 1%] Built target class_list | |
[ 1%] Built target GoogleMock | |
[ 1%] Built target ctags | |
[ 1%] Built target discover_gtest_tests | |
[ 1%] Generating examples from meta-language | |
[ 1%] Built target version |
/* | |
* THIS IS A GENERATED FILE! DO NOT CHANGE THIS FILE! CHANGE THE | |
* CORRESPONDING TEMPLATE FILE, PLEASE! | |
*/ | |
using namespace shogun; | |
%template(TagString) Tag<std::string>; |
[ 0%] Built target class_list | |
[ 0%] Built target HeadersProtobuf | |
[ 0%] Built target ChunksProtobuf | |
[ 1%] Built target ShogunVersionProtobuf | |
[ 3%] Generating version header | |
[ 3%] Built target version | |
[ 96%] Built target libshogun | |
[ 96%] Built target shogun | |
[ 96%] Built target ctags | |
[ 96%] Generating examples from meta-language |
import modshogun as sg | |
ck = sg.CombinedKernel() | |
ck.setInt("num_kernels", 3) | |
gk = sg.GaussianKernel(10, 5) | |
gk_tag = sg.TagKernel("gaussian") | |
print gk == ck.set(gk_tag, gk) # returns gk | |
if gk == ck.getKernel("gaussian") and gk == ck.get(gk_tag): | |
print "Fetched gaussian kernel with width = 5" |
In SGObject.h:
class CSGObject {
...
private:
...
struct Self;
DPtr<Self> self;
...
}
-- Using system's malloc
-- Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY)
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Could NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
-- Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
-- Could NOT find OPENCL (missing: OPENCL_LIBRARY)
-- Looking for viennacl::ocl::type_to_string<char>::apply
-- Looking for viennacl::ocl::type_to_string<char>::apply - not found