<commit_before>from numpy import concatenate, randn, ones
num=100
dist=1

traindat=concatenate((randn(2,num)-dist, randn(2,num)+dist), axis=1)
testdat=concatenate((randn(2,num)-dist, randn(2,num)+dist), axis=1)
trainlab = concatenate((-ones(num), ones(num)))

parameter_list=[[traindat, testdat, label_traindat, 2.1]]


def regression_gaussian_process_modular(traindata_real=traindat, \
		testdata_real=testdat, \
		trainlab=label_traindat, width=2.1)
	from numpy.random import randn
	from shogun.Features import RealFeatures, RegressionLabels
	from shogun.Kernel import GaussianKernel
	try:
		from shogun.Regression import GaussianLikelihood, ZeroMean, \
				ExactInferenceMethod, GaussianProcessRegression
	except ImportError:
		print "Eigen3 needed for Gaussian Processes"
		return

	labels=RegressionLabels(trainlab)
<commit_msg>fix the gp example<commit_after>from numpy import concatenate, ones
from numpy.random import randn
num=100
dist=1

traindat=concatenate((randn(2,num)-dist, randn(2,num)+dist), axis=1)
testdat=concatenate((randn(2,num)-dist, randn(2,num)+dist), axis=1)
label_traindat = concatenate((-ones(num), ones(num)))

parameter_list=[[traindat, testdat, label_traindat, 2.1]]


def regression_gaussian_process_modular(traindata_real=traindat, \
		testdata_real=testdat, \
		trainlab=label_traindat, width=2.1):
	from numpy.random import randn
	from shogun.Features import RealFeatures, RegressionLabels
	from shogun.Kernel import GaussianKernel
	try:
		from shogun.Regression import GaussianLikelihood, ZeroMean, \
				ExactInferenceMethod, GaussianProcessRegression
	except ImportError:
		print "Eigen3 needed for Gaussian Processes"
		return

	labels=RegressionLabels(trainlab)

{'fraction_non_alphanumeric': 0.1028202115158637, 'fraction_numerical': 0.01762632197414806, 'mean_word_length': 7.348039215686274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3022866', 'n_tokens_mistral': 602, 'n_tokens_neox': 579, 'n_words': 120}