Skip to content

Instantly share code, notes, and snippets.

View sonney2k's full-sized avatar

Soeren Sonnenburg sonney2k

View GitHub Profile
#include <shogun/base/init.h>
#include <shogun/classifier/svm/SVMOcas.h>
#include <shogun/features/HashedDocDotFeatures.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/lib/NGramTokenizer.h>
#include <shogun/classifier/svm/SVMLight.h>
#include <shogun/lib/DelimiterTokenizer.h>
#include <shogun/io/LineReader.h>
#include <shogun/labels/BinaryLabels.h>
#include <shogun/classifier/svm/LibLinear.h>
@sonney2k
sonney2k / First Sketch.cpp
Created May 4, 2012 15:48 — forked from nicococo/Sketch.cpp
Shogun Structured Output Toolbox Interface
class CVanillaStructuredOutputMachine : public CMachine {
// Constructor, Destructor
CStructuredOutputMachine(
CStructuredData* trainset,CLoss* loss,CModel* model)
virtual ~CStructuredOutputMachine
// heritable data
CStructuredData* trainset
CLoss* loss
CModel* model
@sonney2k
sonney2k / gist:1828051
Created February 14, 2012 16:48
test running time of 2 diff JS kernel counting
#include <iostream>
#include <vector>
#include <cmath>
#include <time.h>
using namespace std;
static double
JS1 (const vector<double>& a, const vector<double>& b) {
double result = 0;