Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
TEST(CrossValidationMMD, biased_full) | |
{ | |
const int32_t seed = 5; | |
const index_t n=24; | |
const index_t m=15; | |
const index_t dim=2; | |
const index_t num_null_samples=5; | |
const index_t num_folds=3; | |
const index_t num_runs=2; | |
const index_t num_kernels=4; |
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
// Type your code here, or load an example. | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <cimmintrin> | |
using std::vector; | |
using std::iota; | |
using std::accumulate; |
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
#include <iostream> | |
#include <shogun/base/init.h> | |
#include <shogun/lib/config.h> | |
#include <shogun/lib/SGMatrix.h> | |
#include <shogun/base/some.h> | |
#include <shogun/io/streaming/StreamingFileFromDenseFeatures.h> | |
#include <shogun/features/DenseFeatures.h> | |
#include <shogun/features/streaming/generators/MeanShiftDataGenerator.h> | |
#include <shogun/kernel/GaussianKernel.h> | |
#include <shogun/statistical_testing/QuadraticTimeMMD.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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Maths... Why give a s#!t" | |
] | |
}, | |
{ |
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
#include <map> | |
#include <iostream> | |
#include <functional> | |
#include <tuple> | |
#include <memory> | |
#include <initializer_list> | |
#include <utility> | |
namespace std | |
{ |
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
train_feats = sg.RealSparseFeatures('../train.dat') | |
test_feats = sg.RealSparseFeatures('../test.dat') | |
train_labels = sg.RealDenseLabels('../train_labels.dat') | |
gammas = np.arange(1, 10) | |
lda = sg.LDA() | |
lda.preprocessor_chain().enque(sg.DimensionSubset()).enque(sg.NormOne()).enque(sg.FisherLDA()) | |
params = sg.ModelSelectionParameters() |
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
main: | |
mov eax, 409114 | |
ret |
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 code goes here | |
gen_p = GaussianBlobsDataGenerator(...) | |
gen_q = GaussianBlobsDataGenerator(...) | |
mmd = QuadraticTimeMMD(gen_p, gen_q) | |
mmd.set_kernel(GaussianKernel(10, 2**0.5)) | |
mmd.set_num_samples_p(1000) | |
mmd.set_num_samples_q(1000) | |
mmd.enable_watching() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder