This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CResultSet* CMultilabelClrSOModel::argmax( | |
SGVector< float64_t > w, | |
int32_t feat_idx, | |
bool const training) | |
{ | |
CDotFeatures* df = (CDotFeatures*) m_features; | |
REQUIRE(m_feats_dim == df->get_dim_feature_space(), | |
"given features have dimension %d, but we need %d", | |
df->get_dim_feature_space(), m_feats_dim); | |
//printf("argmax(): m_feats_dim:%d\n", m_feats_dim); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do echo "0"; done |head -n 5242882 >test-5242882.csv | |
head -n 5242881 test-5242882.csv >test-5242881.csv | |
wc -l test*csv | |
# 5242881 test-5242881.csv | |
# 5242882 test-5242882.csv | |
ls -la test*csv | |
-rw-rw-r-- 1 tklein tklein 10485762 Jun 29 21:44 test-5242881.csv | |
-rw-rw-r-- 1 tklein tklein 10485764 Jun 29 21:44 test-5242882.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Written (W) 2014 Thoralf Klein | |
*/ | |
#include <shogun/base/init.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Written (W) 2013 Thoralf Klein <thoralf.klein@zib.de> | |
* Copyright (C) 2013 Zuse-Institute-Berlin (ZIB) | |
* Copyright (C) 2013 Thoralf Klein | |
*/ | |
#include <shogun/lib/Hash.h> | |
#include <shogun/lib/SGSparseVector.h> | |
#include <shogun/lib/SGSparseMatrix.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Written (W) 2013 Thoralf Klein <thoralf.klein@zib.de> | |
* Copyright (C) 2013 Zuse-Institute-Berlin (ZIB) | |
* Copyright (C) 2013 Thoralf Klein | |
*/ | |
#include <shogun/io/streaming/StreamingAsciiFile.h> | |
#include <shogun/features/streaming/StreamingSparseFeatures.h> | |
#include <shogun/lib/SGVector.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// your model should provide a method how to create an "own" structured labels object. | |
CStructuredLabels* MultilabelSOModel::structured_labels_factory(int32_t num_labels) | |
{ | |
return new MultilabelSOModel(num_labels); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Taken from: https://gist.github.com/tklein23/9730737 | |
set -ex | |
NUM_CORES=$(grep '^processor\s*:\s*' /proc/cpuinfo |wc -l) | |
NUM_JOBS=$((NUM_CORES+3)) | |
BUILDDIR="$(pwd)/build-before-pr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following includes are only needed for save() and load() | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <limits> | |
void | |
CMultilabelLabels::save(const char * fname) | |
{ | |
FILE * fh = fopen(fname, "wb"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Written (W) 2014 Thoralf Klein | |
*/ | |
#include <shogun/lib/config.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Written (W) 2014 Thoralf Klein | |
*/ | |
#include <shogun/lib/config.h> |
NewerOlder