Skip to content

Instantly share code, notes, and snippets.

Viktor Gal vigsterkr

Block or report user

Report or block vigsterkr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vigsterkr / ShogunML_n_SciRuby.ipynb
Created Feb 1, 2020
ShogunML with SciRuby stack
View ShogunML_n_SciRuby.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:3268e9482b90250b6450f6187e647cd7
class CSGObject {
static void set_seed(uint32_t seed) {
CSGObject::m_seed = seed;
static uint32_t m_seed;
[]() { auto rng = std::unique_ptr<CRandom>(new CRandom()); return rng->random(); }
vigsterkr /
Created Jun 24, 2017
shogunboard - aka monitoring shogun models with tensorboard
#include <shogun/base/init.h>
#include <shogun/base/some.h>
#include <shogun/labels/MulticlassLabels.h>
#include <shogun/lib/SGVector.h>
#include <shogun/io/SerializableAsciiFile.h>
#include <shogun/machine/gp/SoftMaxLikelihood.h>
#include <shogun/kernel/GaussianKernel.h>
#include <shogun/classifier/GaussianProcessClassification.h>
#include <shogun/mathematics/Math.h>
#include <shogun/features/DenseFeatures.h>
vigsterkr / random.h
Last active Jun 21, 2017
new random in shogun prototype
View random.h
template <typename RandomEngine = std::mt19937> class CRandom {
CRandom() {
CRandom(uint32_t seed);
int32_t random(int32_t from, int32_t to) const
vigsterkr / DynamicArray.h
Last active Jun 20, 2017
how to fix serialization of std::vector
View DynamicArray.h
virtual void load_serializable_post() throw (ShogunException)
m_array.assign(m_array_content, m_array_content+num_elements);
/** Can (optionally) be overridden to pre-initialize some member
* variables which are not PARAMETER::ADD'ed. Make sure that at
vigsterkr / gist:6f75563c64f62b33b4ac7d0e09ab22d5
Last active Apr 24, 2017
Heiko is worrie that we will loose it :)
View gist:6f75563c64f62b33b4ac7d0e09ab22d5
// Immutable features
// linear model
- dot prod:
- pairs
- cov var matrix: there's a Feature operator => CovarView => matrix
const char* class_name="{{class}}";
CSGObject* object = new_sgserializable(class_name, PT_NOT_GENERIC);
ASSERT_TRUE(object != NULL);
/* test for get_name() */
ASSERT_TRUE(strcmp(object->get_name(), class_name) == 0);
/* test for .equals() */
View gist:5756383
cd /Users/wiking/shogun/build/src/interfaces/python_modular && /usr/bin/c++ -DDSFMT_MEXP=19937 -DHAVE_ARPACK -DHAVE_DOXYGEN -DHAVE_EIGEN3 -DHAVE_HDF5 -DHAVE_JSON -DHAVE_LAPACK -DHAVE_LARGEFILE -DHAVE_LGAMMAL -DHAVE_LOG2 -DHAVE_POWL -DHAVE_PTHREAD -DHAVE_SQRTL -DHAVE_XML -DSFMT_MEXP=19937 -DUSE_BIGSTATES -DUSE_BOOL -DUSE_BZIP2 -DUSE_CHAR -DUSE_FLOAT32 -DUSE_FLOAT64 -DUSE_FLOATMAX -DUSE_GLPK -DUSE_GZIP -DUSE_HMMCACHE -DUSE_INT16 -DUSE_INT32 -DUSE_INT64 -DUSE_INT8 -DUSE_LZMA -DUSE_LZO -DUSE_REFERENCE_COUNTING -DUSE_SHORTREAL_KERNELCACHE -DUSE_SNAPPY -DUSE_SVMLIGHT -DUSE_UINT16 -DUSE_UINT32 -DUSE_UINT64 -DUSE_UINT8 -D_python_modular_EXPORTS -g -fPIC -I/opt/local/include -I/opt/local/lib/../include -I/opt/local/include/eigen3 -I/opt/local/include/json -I/opt/local/include/libxml2 -I/System/Library/Frameworks/Python.framework/Headers -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/Users/wiking/shogun/src -o CMakeFiles/_python_modular.dir/modshogunPYTHON_wrap.c
vigsterkr / gist:5413663
Created Apr 18, 2013
pnorm templatization
View gist:5413663
diff --git a/src/shogun/preprocessor/PNorm.cpp b/src/shogun/preprocessor/PNorm.cpp
index 6158804..bdd28f0 100644
--- a/src/shogun/preprocessor/PNorm.cpp
+++ b/src/shogun/preprocessor/PNorm.cpp
@@ -19,27 +19,27 @@
using namespace shogun;
-CPNorm::CPNorm ()
-: CDensePreprocessor<float64_t>(),
You can’t perform that action at this time.