diff --git a/GPy/likelihoods/__init__.py b/GPy/likelihoods/__init__.py index 56866c65..4372d1a3 100644 --- a/GPy/likelihoods/__init__.py +++ b/GPy/likelihoods/__init__.py @@ -14,9 +14,9 @@ except ImportError: sympy_available=False if sympy_available: # These are likelihoods that rely on symbolic. - from symbolic2 import Symbolic - #from sstudent_t import SstudentT - #from negative_binomial import Negative_binomial - from skew_normal2 import Skew_normal - #from skew_exponential import Skew_exponential + from symbolic import Symbolic + from sstudent_t import SstudentT + from negative_binomial import Negative_binomial + from skew_normal import Skew_normal + from skew_exponential import Skew_exponential #from null_category import Null_category diff --git a/GPy/likelihoods/negative_binomial.py b/GPy/likelihoods/negative_binomial.py index 1130375b..7e0e2ad5 100644 --- a/GPy/likelihoods/negative_binomial.py +++ b/GPy/likelihoods/negative_binomial.py @@ -16,33 +16,33 @@ import link_functions from symbolic import Symbolic from scipy import stats -if sympy_available: - class Negative_binomial(Symbolic): - """ - Negative binomial +class Negative_binomial(Symbolic): + """ + Negative binomial - .. math:: - p(y_{i}|\pi(f_{i})) = \left(\frac{r}{r+f_i}\right)^r \frac{\Gamma(r+y_i)}{y!\Gamma(r)}\left(\frac{f_i}{r+f_i}\right)^{y_i} + .. math:: + p(y_{i}|\pi(f_{i})) = \left(\frac{r}{r+f_i}\right)^r \frac{\Gamma(r+y_i)}{y!\Gamma(r)}\left(\frac{f_i}{r+f_i}\right)^{y_i} - .. Note:: - Y takes non zero integer values.. - link function should have a positive domain, e.g. log (default). + .. Note:: + Y takes non zero integer values.. + link function should have a positive domain, e.g. log (default). - .. See also:: - symbolic.py, for the parent class - """ - def __init__(self, gp_link=None): - if gp_link is None: - gp_link = link_functions.Identity() + .. See also:: + symbolic.py, for the parent class + """ + def __init__(self, gp_link=None, dispersion=1.0): + parameters = {'dispersion':dispersion} + if gp_link is None: + gp_link = link_functions.Identity() - dispersion = sym.Symbol('dispersion', positive=True, real=True) - y = sym.Symbol('y', nonnegative=True, integer=True) - f = sym.Symbol('f', positive=True, real=True) - gp_link = link_functions.Log() - log_pdf=dispersion*sym.log(dispersion) - (dispersion+y)*sym.log(dispersion+f) + gammaln(y+dispersion) - gammaln(y+1) - gammaln(dispersion) + y*sym.log(f) - #log_pdf= -(dispersion+y)*logisticln(f-sym.log(dispersion)) + gammaln(y+dispersion) - gammaln(y+1) - gammaln(dispersion) + y*(f-sym.log(dispersion)) - super(Negative_binomial, self).__init__(log_pdf=log_pdf, gp_link=gp_link, name='Negative_binomial') + dispersion = sym.Symbol('dispersion', positive=True, real=True) + y_0 = sym.Symbol('y_0', nonnegative=True, integer=True) + f_0 = sym.Symbol('f_0', positive=True, real=True) + gp_link = link_functions.Log() + log_pdf=dispersion*sym.log(dispersion) - (dispersion+y_0)*sym.log(dispersion+f_0) + gammaln(y_0+dispersion) - gammaln(y_0+1) - gammaln(dispersion) + y_0*sym.log(f_0) + #log_pdf= -(dispersion+y)*logisticln(f-sym.log(dispersion)) + gammaln(y+dispersion) - gammaln(y+1) - gammaln(dispersion) + y*(f-sym.log(dispersion)) + super(Negative_binomial, self).__init__(log_pdf=log_pdf, parameters=parameters, gp_link=gp_link, name='Negative_binomial') - # TODO: Check this. - self.log_concave = False + # TODO: Check this. + self.log_concave = False diff --git a/GPy/likelihoods/symbolic.py b/GPy/likelihoods/symbolic.py index feac9e9d..1f80610f 100644 --- a/GPy/likelihoods/symbolic.py +++ b/GPy/likelihoods/symbolic.py @@ -1,316 +1,279 @@ # Copyright (c) 2014 GPy Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) - -try: - import sympy as sym - sympy_available=True - from sympy.utilities.lambdify import lambdify -except ImportError: - sympy_available=False - +import sympy as sym import numpy as np -import link_functions -from scipy import stats, integrate -from scipy.special import gammaln, gamma, erf, erfc, erfcx, polygamma -from GPy.util.functions import normcdf, normcdfln, logistic, logisticln from likelihood import Likelihood -from ..core.parameterization import Param +from ..core.symbolic import Symbolic_core -if sympy_available: - class Symbolic(Likelihood): +class Symbolic(Likelihood, Symbolic_core): + """ + Symbolic likelihood. + + Likelihood where the form of the likelihood is provided by a sympy expression. + + """ + def __init__(self, log_pdf=None, logZ=None, missing_log_pdf=None, gp_link=None, name='symbolic', log_concave=False, parameters=None, func_modules=[]): + + if gp_link is None: + gp_link = link_functions.Identity() + + if log_pdf is None: + raise ValueError, "You must provide an argument for the log pdf." + + Likelihood.__init__(self, gp_link, name=name) + functions = {'log_pdf':log_pdf} + self.cacheable = ['F', 'Y'] + + self.missing_data = False + if missing_log_pdf: + self.missing_data = True + functions['missing_log_pdf']=missing_log_pdf + + self.ep_analytic = False + if logZ: + self.ep_analytic = True + functions['logZ'] = logZ + self.cacheable += ['M', 'V'] + + Symbolic_core.__init__(self, functions, cacheable=self.cacheable, derivatives = ['F', 'theta'], parameters=parameters, func_modules=func_modules) + + # TODO: Is there an easy way to check whether the pdf is log + self.log_concave = log_concave + + + + def _set_derivatives(self, derivatives): + # these are arguments for computing derivatives. + print "Whoop" + Symbolic_core._set_derivatives(self, derivatives) + + # add second and third derivatives for Laplace approximation. + derivative_arguments = [] + if derivatives is not None: + for derivative in derivatives: + derivative_arguments += self.variables[derivative] + exprs = ['log_pdf'] + if self.missing_data: + exprs.append('missing_log_pdf') + for expr in exprs: + self.expressions[expr]['second_derivative'] = {theta.name : self.stabilize(sym.diff(self.expressions[expr]['derivative']['f_0'], theta)) for theta in derivative_arguments} + self.expressions[expr]['third_derivative'] = {theta.name : self.stabilize(sym.diff(self.expressions[expr]['second_derivative']['f_0'], theta)) for theta in derivative_arguments} + if self.ep_analytic: + derivative_arguments = [M] + # add second derivative for EP + exprs = ['logZ'] + if self.missing_data: + exprs.append('missing_logZ') + for expr in exprs: + self.expressions[expr]['second_derivative'] = {theta.name : self.stabilize(sym.diff(self.expressions[expr]['derivative'], theta)) for theta in derivative_arguments} + + + def eval_update_cache(self, Y, **kwargs): + # TODO: place checks for inf/nan in here + # for all provided keywords + Symbolic_core.eval_update_cache(self, Y=Y, **kwargs) + # Y = np.atleast_2d(Y) + # for variable, code in sorted(self.code['parameters_changed'].iteritems()): + # self._set_attribute(variable, eval(code, self.namespace)) + # for i, theta in enumerate(self.variables['Y']): + # missing = np.isnan(Y[:, i]) + # self._set_attribute('missing_' + str(i), missing) + # self._set_attribute(theta.name, value[missing, i][:, None]) + # for variable, value in kwargs.items(): + # # update their cached values + # if value is not None: + # if variable == 'F' or variable == 'M' or variable == 'V' or variable == 'Y_metadata': + # for i, theta in enumerate(self.variables[variable]): + # self._set_attribute(theta.name, value[:, i][:, None]) + # else: + # self._set_attribute(theta.name, value[:, i]) + # for variable, code in sorted(self.code['update_cache'].iteritems()): + # self._set_attribute(variable, eval(code, self.namespace)) + + + def parameters_changed(self): + pass + + def update_gradients(self, grads): """ - Symbolic likelihood. + Pull out the gradients, be careful as the order must match the order + in which the parameters are added + """ + # The way the Laplace approximation is run requires the + # covariance function to compute the true gradient (because it + # is dependent on the mode). This means we actually compute + # the gradient outside this object. This function would + # normally ask the object to update its gradients internally, + # but here it provides them externally, because they are + # computed in the inference code. TODO: Thought: How does this + # effect EP? Shouldn't this be done by a separate + # Laplace-approximation specific call? + for theta, grad in zip(self.variables['theta'], grads): + parameter = getattr(self, theta.name) + setattr(parameter, 'gradient', grad) - Likelihood where the form of the likelihood is provided by a sympy expression. + def pdf_link(self, f, y, Y_metadata=None): + """ + Likelihood function given inverse link of f. + + :param f: inverse link of latent variables. + :type f: Nx1 array + :param y: data + :type y: Nx1 array + :param Y_metadata: Y_metadata which is not used in student t distribution + :returns: likelihood evaluated for this point + :rtype: float + """ + return np.exp(self.logpdf_link(f, y, Y_metadata=None)) + + def logpdf_link(self, f, y, Y_metadata=None): + """ + Log Likelihood Function given inverse link of latent variables. + + :param f: latent variables (inverse link of f) + :type f: Nx1 array + :param y: data + :type y: Nx1 array + :param Y_metadata: Y_metadata + :returns: likelihood evaluated for this point + :rtype: float """ - def __init__(self, log_pdf=None, logZ=None, missing_log_pdf=None, gp_link=None, name='symbolic', log_concave=False, param=None, func_modules=[]): + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + if self.missing_data: + missing_flag = np.isnan(y) + not_missing_flag = np.logical_not(missing_flag) + ll = self.eval_function('missing_log_pdf', F=f[missing_flag]).sum() + ll += self.eval_function('log_pdf', F=f[not_missing_flag], Y=y[not_missing_flag], Y_metadata=Y_metadata[not_missing_flag]).sum() + else: + ll = self.eval_function('log_pdf', F=f, Y=y, Y_metadata=Y_metadata).sum() - if gp_link is None: - gp_link = link_functions.Identity() + return ll - if log_pdf is None: - raise ValueError, "You must provide an argument for the log pdf." + def dlogpdf_dlink(self, f, y, Y_metadata=None): + """ + Gradient of log likelihood with respect to the inverse link function. - self.func_modules = func_modules - self.func_modules += [{'gamma':gamma, - 'gammaln':gammaln, - 'erf':erf, 'erfc':erfc, - 'erfcx':erfcx, - 'polygamma':polygamma, - 'normcdf':normcdf, - 'normcdfln':normcdfln, - 'logistic':logistic, - 'logisticln':logisticln}, - 'numpy'] + :param f: latent variables (inverse link of f) + :type f: Nx1 array + :param y: data + :type y: Nx1 array + :param Y_metadata: Y_metadata + :returns: gradient of likelihood with respect to each point. + :rtype: Nx1 array - super(Symbolic, self).__init__(gp_link, name=name) - self.missing_data = False - self._sym_log_pdf = log_pdf - if missing_log_pdf: - self.missing_data = True - self._sym_missing_log_pdf = missing_log_pdf + """ + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + if self.missing_data: + return np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['derivative']['f_0'], self.namespace), + eval(self.code['log_pdf']['derivative']['f_0'], self.namespace)) + else: + return np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['derivative']['f_0'], self.namespace)) - # pull the variable names out of the symbolic pdf - sym_vars = [e for e in self._sym_log_pdf.atoms() if e.is_Symbol] - self._sym_f = [e for e in sym_vars if e.name=='f'] - if not self._sym_f: - raise ValueError('No variable f in log pdf.') - self._sym_y = [e for e in sym_vars if e.name=='y'] - if not self._sym_y: - raise ValueError('No variable y in log pdf.') - self._sym_theta = sorted([e for e in sym_vars if not (e.name=='f' or e.name=='y')],key=lambda e:e.name) + def d2logpdf_dlink2(self, f, y, Y_metadata=None): + """ + Hessian of log likelihood given inverse link of latent variables with respect to that inverse link. + i.e. second derivative logpdf at y given inv_link(f_i) and inv_link(f_j) w.r.t inv_link(f_i) and inv_link(f_j). - theta_names = [theta.name for theta in self._sym_theta] + + :param f: inverse link of the latent variables. + :type f: Nx1 array + :param y: data + :type y: Nx1 array + :param Y_metadata: Y_metadata which is not used in student t distribution + :returns: Diagonal of Hessian matrix (second derivative of likelihood evaluated at points f) + :rtype: Nx1 array + + .. Note:: + Returns diagonal of Hessian, since every where else it is + 0, as the likelihood factorizes over cases (the + distribution for y_i depends only on link(f_i) not on + link(f_(j!=i)) + """ + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + if self.missing_data: + return np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['second_derivative']['f_0'], self.namespace), + eval(self.code['log_pdf']['second_derivative']['f_0'], self.namespace)) + else: + return np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['second_derivative']['f_0'], self.namespace)) + + def d3logpdf_dlink3(self, f, y, Y_metadata=None): + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + if self.missing_data: + return np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['third_derivative']['f_0'], self.namespace), + eval(self.code['log_pdf']['third_derivative']['f_0'], self.namespace)) + else: + return np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['third_derivative']['f_0'], self.namespace)) + + def dlogpdf_link_dtheta(self, f, y, Y_metadata=None): + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + g = np.zeros((np.atleast_1d(y).shape[0], len(self.variables['theta']))) + for i, theta in enumerate(self.variables['theta']): if self.missing_data: - # pull the variable names out of missing data - sym_vars = [e for e in self._sym_missing_log_pdf.atoms() if e.is_Symbol] - sym_f = [e for e in sym_vars if e.name=='f'] - if not sym_f: - raise ValueError('No variable f in missing data log pdf.') - sym_y = [e for e in sym_vars if e.name=='y'] - if sym_y: - raise ValueError('Data is present in missing data portion of likelihood.') - # additional missing data parameters - missing_theta = sorted([e for e in sym_vars if not (e.name=='f' or e.name=='missing' or e.name in theta_names)],key=lambda e:e.name) - self._sym_theta += missing_theta - self._sym_theta = sorted(self._sym_theta, key=lambda e:e.name) - - # These are all the arguments need to compute likelihoods. - self.arg_list = self._sym_y + self._sym_f + self._sym_theta - - # these are arguments for computing derivatives. - derivative_arguments = self._sym_f + self._sym_theta - - # Do symbolic work to compute derivatives. - self._log_pdf_derivatives = {theta.name : stabilise(sym.diff(self._sym_log_pdf,theta)) for theta in derivative_arguments} - self._log_pdf_second_derivatives = {theta.name : stabilise(sym.diff(self._log_pdf_derivatives['f'],theta)) for theta in derivative_arguments} - self._log_pdf_third_derivatives = {theta.name : stabilise(sym.diff(self._log_pdf_second_derivatives['f'],theta)) for theta in derivative_arguments} - - if self.missing_data: - # Do symbolic work to compute derivatives. - self._missing_log_pdf_derivatives = {theta.name : stabilise(sym.diff(self._sym_missing_log_pdf,theta)) for theta in derivative_arguments} - self._missing_log_pdf_second_derivatives = {theta.name : stabilise(sym.diff(self._missing_log_pdf_derivatives['f'],theta)) for theta in derivative_arguments} - self._missing_log_pdf_third_derivatives = {theta.name : stabilise(sym.diff(self._missing_log_pdf_second_derivatives['f'],theta)) for theta in derivative_arguments} - - - # Add parameters to the model. - for theta in self._sym_theta: - val = 1.0 - # TODO: need to decide how to handle user passing values for the se parameter vectors. - if param is not None: - if param.has_key(theta.name): - val = param[theta.name] - setattr(self, theta.name, Param(theta.name, val, None)) - self.add_parameters(getattr(self, theta.name)) - - - # TODO: Is there an easy way to check whether the pdf is log - # concave? For the moment, need user to specify. - self.log_concave = log_concave - - # initialise code arguments - self._arguments = {} - - # generate the code for the pdf and derivatives - self._gen_code() - - def list_functions(self): - """Return a list of all symbolic functions in the model and their names.""" - def _gen_code(self): - """Generate the code from the symbolic parts that will be used for likleihod computation.""" - # TODO: Check here whether theano is available and set up - # functions accordingly. - symbolic_functions = [self._sym_log_pdf] - deriv_list = [self._log_pdf_derivatives, self._log_pdf_second_derivatives, self._log_pdf_third_derivatives] - symbolic_functions += [deriv[key] for key in sorted(deriv.keys()) for deriv in deriv_list] - if self.missing_data: - symbolic_functions+=[self._sym_missing_log_pdf] - deriv_list = [self._missing_log_pdf_derivatives, self._missing_log_pdf_second_derivatives, self._missing_log_pdf_third_derivatives] - symbolic_functions += [deriv[key] for key in sorted(deriv.keys()) for deriv in deriv_list] - # self._log_pdf_function = lambdify(self.arg_list, self._sym_log_pdf, self.func_modules) - - # # compute code for derivatives - # self._derivative_code = {key: lambdify(self.arg_list, self._log_pdf_derivatives[key], self.func_modules) for key in self._log_pdf_derivatives.keys()} - # self._second_derivative_code = {key: lambdify(self.arg_list, self._log_pdf_second_derivatives[key], self.func_modules) for key in self._log_pdf_second_derivatives.keys()} - # self._third_derivative_code = {key: lambdify(self.arg_list, self._log_pdf_third_derivatives[key], self.func_modules) for key in self._log_pdf_third_derivatives.keys()} - - # if self.missing_data: - # self._missing_derivative_code = {key: lambdify(self.arg_list, self._missing_log_pdf_derivatives[key], self.func_modules) for key in self._missing_log_pdf_derivatives.keys()} - # self._missing_second_derivative_code = {key: lambdify(self.arg_list, self._missing_log_pdf_second_derivatives[key], self.func_modules) for key in self._missing_log_pdf_second_derivatives.keys()} - # self._missing_third_derivative_code = {key: lambdify(self.arg_list, self._missing_log_pdf_third_derivatives[key], self.func_modules) for key in self._missing_log_pdf_third_derivatives.keys()} - - # TODO: compute EP code parts based on logZ. We need dlogZ/dmu, d2logZ/dmu2 and dlogZ/dtheta - - def parameters_changed(self): - pass - - def update_gradients(self, grads): - """ - Pull out the gradients, be careful as the order must match the order - in which the parameters are added - """ - # The way the Laplace approximation is run requires the - # covariance function to compute the true gradient (because it - # is dependent on the mode). This means we actually compute - # the gradient outside this object. This function would - # normally ask the object to update its gradients internally, - # but here it provides them externally, because they are - # computed in the inference code. TODO: Thought: How does this - # effect EP? Shouldn't this be done by a separate - # Laplace-approximation specific call? - for grad, theta in zip(grads, self._sym_theta): - parameter = getattr(self, theta.name) - setattr(parameter, 'gradient', grad) - - def _arguments_update(self, f, y): - """Set up argument lists for the derivatives.""" - # If we do make use of Theano, then at this point we would - # need to do a lot of precomputation to ensure that the - # likelihoods and gradients are computed together, then check - # for parameter changes before updating. - for i, fvar in enumerate(self._sym_f): - self._arguments[fvar.name] = f - for i, yvar in enumerate(self._sym_y): - self._arguments[yvar.name] = y - for theta in self._sym_theta: - self._arguments[theta.name] = np.asarray(getattr(self, theta.name)) - - def pdf_link(self, inv_link_f, y, Y_metadata=None): - """ - Likelihood function given inverse link of f. - - :param inv_link_f: inverse link of latent variables. - :type inv_link_f: Nx1 array - :param y: data - :type y: Nx1 array - :param Y_metadata: Y_metadata which is not used in student t distribution - :returns: likelihood evaluated for this point - :rtype: float - """ - return np.exp(self.logpdf_link(inv_link_f, y, Y_metadata=None)) - - def logpdf_link(self, inv_link_f, y, Y_metadata=None): - """ - Log Likelihood Function given inverse link of latent variables. - - :param inv_inv_link_f: latent variables (inverse link of f) - :type inv_inv_link_f: Nx1 array - :param y: data - :type y: Nx1 array - :param Y_metadata: Y_metadata - :returns: likelihood evaluated for this point - :rtype: float - - """ - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) - if self.missing_data: - ll = np.where(np.isnan(y), self._missing_log_pdf_function(**self._missing_arguments), self._log_pdf_function(**self._arguments)) + g[:, i:i+1] = np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['derivative'][theta.name], self.namespace), + eval(self.code['log_pdf']['derivative'][theta.name], self.namespace)) else: - ll = np.where(np.isnan(y), 0., self._log_pdf_function(**self._arguments)) - return np.sum(ll) + g[:, i:i+1] = np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['derivative'][theta.name], self.namespace)) + return g.sum(0) - def dlogpdf_dlink(self, inv_link_f, y, Y_metadata=None): - """ - Gradient of log likelihood with respect to the inverse link function. - - :param inv_inv_link_f: latent variables (inverse link of f) - :type inv_inv_link_f: Nx1 array - :param y: data - :type y: Nx1 array - :param Y_metadata: Y_metadata - :returns: gradient of likelihood with respect to each point. - :rtype: Nx1 array - - """ - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) + def dlogpdf_dlink_dtheta(self, f, y, Y_metadata=None): + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + g = np.zeros((np.atleast_1d(y).shape[0], len(self.variables['theta']))) + for i, theta in enumerate(self.variables['theta']): if self.missing_data: - return np.where(np.isnan(y), self._missing_derivative_code['f'](**self._missing_argments), self._derivative_code['f'](**self._argments)) + g[:, i:i+1] = np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['second_derivative'][theta.name], self.namespace), + eval(self.code['log_pdf']['second_derivative'][theta.name], self.namespace)) else: - return np.where(np.isnan(y), 0., self._derivative_code['f'](**self._arguments)) + g[:, i:i+1] = np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['second_derivative'][theta.name], self.namespace)) + return g - def d2logpdf_dlink2(self, inv_link_f, y, Y_metadata=None): - """ - Hessian of log likelihood given inverse link of latent variables with respect to that inverse link. - i.e. second derivative logpdf at y given inv_link(f_i) and inv_link(f_j) w.r.t inv_link(f_i) and inv_link(f_j). - - - :param inv_link_f: inverse link of the latent variables. - :type inv_link_f: Nx1 array - :param y: data - :type y: Nx1 array - :param Y_metadata: Y_metadata which is not used in student t distribution - :returns: Diagonal of Hessian matrix (second derivative of likelihood evaluated at points f) - :rtype: Nx1 array - - .. Note:: - Returns diagonal of Hessian, since every where else it is - 0, as the likelihood factorizes over cases (the - distribution for y_i depends only on link(f_i) not on - link(f_(j!=i)) - """ - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) + def d2logpdf_dlink2_dtheta(self, f, y, Y_metadata=None): + assert np.atleast_1d(f).shape == np.atleast_1d(y).shape + self.eval_update_cache(F=f, Y=y, Y_metadata=Y_metadata) + g = np.zeros((np.atleast_1d(y).shape[0], len(self.variables['theta']))) + for i, theta in enumerate(self.variables['theta']): if self.missing_data: - return np.where(np.isnan(y), self._missing_second_derivative_code['f'](**self._missing_argments), self._second_derivative_code['f'](**self._argments)) + g[:, i:i+1] = np.where(np.isnan(y), + eval(self.code['missing_log_pdf']['third_derivative'][theta.name], self.namespace), + eval(self.code['log_pdf']['third_derivative'][theta.name], self.namespace)) else: - return np.where(np.isnan(y), 0., self._second_derivative_code['f'](**self._arguments)) + g[:, i:i+1] = np.where(np.isnan(y), + 0., + eval(self.code['log_pdf']['third_derivative'][theta.name], self.namespace)) + return g - def d3logpdf_dlink3(self, inv_link_f, y, Y_metadata=None): - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) - if self.missing_data: - return np.where(np.isnan(y), self._missing_third_derivative_code['f'](**self._missing_argments), self._third_derivative_code['f'](**self._argments)) - else: - return np.where(np.isnan(y), 0., self._third_derivative_code['f'](**self._arguments)) + def predictive_mean(self, mu, sigma, Y_metadata=None): + raise NotImplementedError - def dlogpdf_link_dtheta(self, inv_link_f, y, Y_metadata=None): - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) - g = np.zeros((np.atleast_1d(y).shape[0], len(self._sym_theta))) - for i, theta in enumerate(self._sym_theta): - if self.missing_data: - g[:, i:i+1] = np.where(np.isnan(y), self._missing_derivative_code[theta.name](**self._arguments), self._derivative_code[theta.name](**self._arguments)) - else: - g[:, i:i+1] = np.where(np.isnan(y), 0., self._derivative_code[theta.name](**self._arguments)) - return g.sum(0) + def predictive_variance(self, mu,variance, predictive_mean=None, Y_metadata=None): + raise NotImplementedError - def dlogpdf_dlink_dtheta(self, inv_link_f, y, Y_metadata=None): - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) - g = np.zeros((np.atleast_1d(y).shape[0], len(self._sym_theta))) - for i, theta in enumerate(self._sym_theta): - if self.missing_data: - g[:, i:i+1] = np.where(np.isnan(y), self._missing_second_derivative_code[theta.name](**self._arguments), self._second_derivative_code[theta.name](**self._arguments)) - else: - g[:, i:i+1] = np.where(np.isnan(y), 0., self._second_derivative_code[theta.name](**self._arguments)) - return g + def conditional_mean(self, gp): + raise NotImplementedError - def d2logpdf_dlink2_dtheta(self, inv_link_f, y, Y_metadata=None): - assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape - self._arguments_update(inv_link_f, y) - g = np.zeros((np.atleast_1d(y).shape[0], len(self._sym_theta))) - for i, theta in enumerate(self._sym_theta): - if self.missing_data: - g[:, i:i+1] = np.where(np.isnan(y), self._missing_third_derivative_code[theta.name](**self._arguments), self._third_derivative_code[theta.name](**self._arguments)) - else: - g[:, i:i+1] = np.where(np.isnan(y), 0., self._third_derivative_code[theta.name](**self._arguments)) - return g + def conditional_variance(self, gp): + raise NotImplementedError - def predictive_mean(self, mu, sigma, Y_metadata=None): - raise NotImplementedError - - def predictive_variance(self, mu,variance, predictive_mean=None, Y_metadata=None): - raise NotImplementedError - - def conditional_mean(self, gp): - raise NotImplementedError - - def conditional_variance(self, gp): - raise NotImplementedError - - def samples(self, gp, Y_metadata=None): - raise NotImplementedError + def samples(self, gp, Y_metadata=None): + raise NotImplementedError diff --git a/GPy/util/data_resources.json b/GPy/util/data_resources.json index 845d56be..57b79f10 100644 --- a/GPy/util/data_resources.json +++ b/GPy/util/data_resources.json @@ -1 +1,409 @@ -{"rogers_girolami_data": {"files": [["firstcoursemldata.tar.gz"]], "license": null, "citation": "A First Course in Machine Learning. Simon Rogers and Mark Girolami: Chapman & Hall/CRC, ISBN-13: 978-1439824146", "details": "Data from the textbook 'A First Course in Machine Learning'. Available from http://www.dcs.gla.ac.uk/~srogers/firstcourseml/.", "urls": ["https://www.dropbox.com/sh/7p6tu1t29idgliq/_XqlH_3nt9/"], "suffices": [["?dl=1"]], "size": 21949154}, "ankur_pose_data": {"files": [["ankurDataPoseSilhouette.mat"]], "citation": "3D Human Pose from Silhouettes by Relevance Vector Regression (In CVPR'04). A. Agarwal and B. Triggs.", "license": null, "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/ankur_pose_data/"], "details": "Artificially generated data of silhouettes given poses. Note that the data does not display a left/right ambiguity because across the entire data set one of the arms sticks out more the the other, disambiguating the pose as to which way the individual is facing."}, "osu_accad": {"files": [["swagger1TXT.ZIP", "handspring1TXT.ZIP", "quickwalkTXT.ZIP", "run1TXT.ZIP", "sprintTXT.ZIP", "dogwalkTXT.ZIP", "camper_04TXT.ZIP", "dance_KB3_TXT.ZIP", "per20_TXT.ZIP", "perTWO07_TXT.ZIP", "perTWO13_TXT.ZIP", "perTWO14_TXT.ZIP", "perTWO15_TXT.ZIP", "perTWO16_TXT.ZIP"], ["connections.txt"]], "license": "Data is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).", "citation": "The Open Motion Data Project by The Ohio State University Advanced Computing Center for the Arts and Design, http://accad.osu.edu/research/mocap/mocap_data.htm.", "details": "Motion capture data of different motions from the Open Motion Data Project at Ohio State University.", "urls": ["http://accad.osu.edu/research/mocap/data/", "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/stick/"], "size": 15922790}, "isomap_face_data": {"files": [["face_data.mat"]], "license": null, "citation": "A Global Geometric Framework for Nonlinear Dimensionality Reduction, J. B. Tenenbaum, V. de Silva and J. C. Langford, Science 290 (5500): 2319-2323, 22 December 2000", "details": "Face data made available by Tenenbaum, de Silva and Langford to demonstrate isomap, available from http://isomap.stanford.edu/datasets.html.", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/isomap_face_data/"], "size": 24229368}, "boston_housing": {"files": [["Index", "housing.data", "housing.names"]], "license": null, "citation": "Harrison, D. and Rubinfeld, D.L. 'Hedonic prices and the demand for clean air', J. Environ. Economics & Management, vol.5, 81-102, 1978.", "details": "The Boston Housing data relates house values in Boston to a range of input variables.", "urls": ["http://archive.ics.uci.edu/ml/machine-learning-databases/housing/"], "size": 51276}, "cmu_mocap_full": {"files": [["allasfamc.zip"]], "license": "From http://mocap.cs.cmu.edu. This data is free for use in research projects. You may include this data in commercially-sold products, but you may not resell this data directly, even in converted form. If you publish results obtained using this data, we would appreciate it if you would send the citation to your published paper to jkh+mocap@cs.cmu.edu, and also would add this text to your acknowledgments section: The data used in this project was obtained from mocap.cs.cmu.edu. The database was created with funding from NSF EIA-0196217.", "citation": "Please include this in your acknowledgements: The data used in this project was obtained from mocap.cs.cmu.edu.'\n 'The database was created with funding from NSF EIA-0196217.", "details": "CMU Motion Capture data base. Captured by a Vicon motion capture system consisting of 12 infrared MX-40 cameras, each of which is capable of recording at 120 Hz with images of 4 megapixel resolution. Motions are captured in a working volume of approximately 3m x 8m. The capture subject wears 41 markers and a stylish black garment.", "urls": ["http://mocap.cs.cmu.edu"], "size": null}, "brendan_faces": {"files": [["frey_rawface.mat"]], "license": null, "citation": "Frey, B. J., Colmenarez, A and Huang, T. S. Mixtures of Local Linear Subspaces for Face Recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition 1998, 32-37, June 1998. Computer Society Press, Los Alamitos, CA.", "details": "A video of Brendan Frey's face popularized as a benchmark for visualization by the Locally Linear Embedding.", "urls": ["http://www.cs.nyu.edu/~roweis/data/"], "size": 1100584}, "olympic_marathon_men": {"files": [["olympicMarathonTimes.csv"]], "license": null, "citation": null, "details": "Olympic mens' marathon gold medal winning times from 1896 to 2012. Time given in pace (minutes per kilometer). Data is originally downloaded and collated from Wikipedia, we are not responsible for errors in the data", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/olympic_marathon_men/"], "size": 584}, "pumadyn-32nm": {"files": [["pumadyn-32nm.tar.gz"]], "license": "Data is made available by the Delve system at the University of Toronto", "citation": "Created by Zoubin Ghahramani using the Matlab Robotics Toolbox of Peter Corke. Corke, P. I. (1996). A Robotics Toolbox for MATLAB. IEEE Robotics and Automation Magazine, 3 (1): 24-32.", "details": "Pumadyn non linear 32 input data set with moderate noise. See http://www.cs.utoronto.ca/~delve/data/pumadyn/desc.html for details.", "urls": ["ftp://ftp.cs.toronto.edu/pub/neuron/delve/data/tarfiles/pumadyn-family/"], "size": 5861646}, "ripley_prnn_data": {"files": [["Cushings.dat", "README", "crabs.dat", "fglass.dat", "fglass.grp", "pima.te", "pima.tr", "pima.tr2", "synth.te", "synth.tr", "viruses.dat", "virus3.dat"]], "license": null, "citation": "Pattern Recognition and Neural Networks by B.D. Ripley (1996) Cambridge University Press ISBN 0 521 46986 7", "details": "Data sets from Brian Ripley's Pattern Recognition and Neural Networks", "urls": ["http://www.stats.ox.ac.uk/pub/PRNN/"], "size": 93565}, "three_phase_oil_flow": {"files": [["DataTrnLbls.txt", "DataTrn.txt", "DataTst.txt", "DataTstLbls.txt", "DataVdn.txt", "DataVdnLbls.txt"]], "license": null, "citation": "Bishop, C. M. and G. D. James (1993). Analysis of multiphase flows using dual-energy gamma densitometry and neural networks. Nuclear Instruments and Methods in Physics Research A327, 580-593", "details": "The three phase oil data used initially for demonstrating the Generative Topographic mapping.", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/three_phase_oil_flow/"], "size": 712796}, "robot_wireless": {"files": [["uw-floor.txt"]], "license": null, "citation": "WiFi-SLAM using Gaussian Process Latent Variable Models by Brian Ferris, Dieter Fox and Neil Lawrence in IJCAI'07 Proceedings pages 2480-2485. Data used in A Unifying Probabilistic Perspective for Spectral Dimensionality Reduction: Insights and New Models by Neil D. Lawrence, JMLR 13 pg 1609--1638, 2012.", "details": "Data created by Brian Ferris and Dieter Fox. Consists of WiFi access point strengths taken during a circuit of the Paul Allen building at the University of Washington.", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/robot_wireless/"], "size": 284390}, "xw_pen": {"files": [["xw_pen_15.csv"]], "license": null, "citation": "Michael E. Tipping and Neil D. Lawrence. Variational inference for Student-t models: Robust Bayesian interpolation and generalised component analysis. Neurocomputing, 69:123--141, 2005", "details": "Accelerometer pen data used for robust regression by Tipping and Lawrence.", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/xw_pen/"], "size": 3410}, "swiss_roll": {"files": [["swiss_roll_data.mat"]], "license": null, "citation": "A Global Geometric Framework for Nonlinear Dimensionality Reduction, J. B. Tenenbaum, V. de Silva and J. C. Langford, Science 290 (5500): 2319-2323, 22 December 2000", "details": "Swiss roll data made available by Tenenbaum, de Silva and Langford to demonstrate isomap, available from http://isomap.stanford.edu/datasets.html.", "urls": ["http://isomap.stanford.edu/"], "size": 800256}, "osu_run1": {"files": [["run1TXT.ZIP"], ["connections.txt"]], "license": "Data is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).", "citation": "The Open Motion Data Project by The Ohio State University Advanced Computing Center for the Arts and Design, http://accad.osu.edu/research/mocap/mocap_data.htm.", "details": "Motion capture data of a stick man running from the Open Motion Data Project at Ohio State University.", "urls": ["http://accad.osu.edu/research/mocap/data/", "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/stick/"], "size": 338103}, "creep_rupture": {"files": [["creeprupt.tar"]], "license": null, "citation": "Materials Algorithms Project Data Library: MAP_DATA_CREEP_RUPTURE. F. Brun and T. Yoshida.", "details": "Provides 2066 creep rupture test results of steels (mainly of two kinds of steels: 2.25Cr and 9-12 wt% Cr ferritic steels). See http://www.msm.cam.ac.uk/map/data/materials/creeprupt-b.html.", "urls": ["http://www.msm.cam.ac.uk/map/data/tar/"], "size": 602797}, "hapmap3": {"files": [["hapmap3_r2_b36_fwd.consensus.qc.poly.map.bz2", "hapmap3_r2_b36_fwd.consensus.qc.poly.ped.bz2", "relationships_w_pops_121708.txt"]], "license": "International HapMap Project Public Access License (http://hapmap.ncbi.nlm.nih.gov/cgi-perl/registration#licence)", "citation": "Gibbs, Richard A., et al. \"The international HapMap project.\" Nature 426.6968 (2003): 789-796.", "details": "HapMap Project: Single Nucleotide Polymorphism sequenced in all human populations. See http://www.nature.com/nature/journal/v426/n6968/abs/nature02168.html for details.", "urls": ["http://hapmap.ncbi.nlm.nih.gov/downloads/genotypes/latest_phaseIII_ncbi_b36/plink_format/"], "size": 3458246739}, "olivetti_faces": {"files": [["att_faces.zip"], ["olivettifaces.mat"]], "license": null, "citation": "Ferdinando Samaria and Andy Harter, Parameterisation of a Stochastic Model for Human Face Identification. Proceedings of 2nd IEEE Workshop on Applications of Computer Vision, Sarasota FL, December 1994", "details": "Olivetti Research Labs Face data base, acquired between December 1992 and December 1994 in the Olivetti Research Lab, Cambridge (which later became AT&T Laboratories, Cambridge). When using these images please give credit to AT&T Laboratories, Cambridge. ", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/olivetti_faces/", "http://www.cs.nyu.edu/~roweis/data/"], "size": 8561331}, "della_gatta": {"files": [["DellaGattadata.mat"]], "license": null, "citation": "Direct targets of the TRP63 transcription factor revealed by a combination of gene expression profiling and reverse engineering. Giusy Della Gatta, Mukesh Bansal, Alberto Ambesi-Impiombato, Dario Antonini, Caterina Missero, and Diego di Bernardo, Genome Research 2008", "details": "The full gene expression data set from della Gatta et al (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2413161/) processed by RMA.", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/della_gatta/"], "size": 3729650}, "epomeo_gpx": {"files": [["endomondo_1.gpx", "endomondo_2.gpx", "garmin_watch_via_endomondo.gpx", "viewranger_phone.gpx", "viewranger_tablet.gpx"]], "license": null, "citation": "", "details": "Five different GPS traces of the same run up Mount Epomeo in Ischia. The traces are from different sources. endomondo_1 and endomondo_2 are traces from the mobile phone app Endomondo, with a split in the middle. garmin_watch_via_endomondo is the trace from a Garmin watch, with a segment missing about 4 kilometers in. viewranger_phone and viewranger_tablet are traces from a phone and a tablet through the viewranger app. The viewranger_phone data comes from the same mobile phone as the Endomondo data (i.e. there are 3 GPS devices, but one device recorded two traces).", "urls": ["http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/epomeo_gpx/"], "size": 2031872}} \ No newline at end of file +{ + "rogers_girolami_data":{ + "files":[ + [ + "firstcoursemldata.tar.gz" + ] + ], + "license":null, + "citation":"A First Course in Machine Learning. Simon Rogers and Mark Girolami: Chapman & Hall/CRC, ISBN-13: 978-1439824146", + "details":"Data from the textbook 'A First Course in Machine Learning'. Available from http://www.dcs.gla.ac.uk/~srogers/firstcourseml/.", + "urls":[ + "https://www.dropbox.com/sh/7p6tu1t29idgliq/_XqlH_3nt9/" + ], + "suffices":[ + [ + "?dl=1" + ] + ], + "size":21949154 + }, + "ankur_pose_data":{ + "files":[ + [ + "ankurDataPoseSilhouette.mat" + ] + ], + "citation":"3D Human Pose from Silhouettes by Relevance Vector Regression (In CVPR'04). A. Agarwal and B. Triggs.", + "license":null, + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/ankur_pose_data/" + ], + "details":"Artificially generated data of silhouettes given poses. Note that the data does not display a left/right ambiguity because across the entire data set one of the arms sticks out more the the other, disambiguating the pose as to which way the individual is facing.", + "size":1 + }, + "football_data":{ + "files":[ + [ + "E0.csv", "E1.csv", "E2.csv", "E3.csv" + ] + ], + "citation":"", + "license":null, + "urls":[ + "http://www.football-data.co.uk/mmz4281/" + ], + "details":"Results of English football matches since 1993/94 season.", + "size":1 + }, + "google_trends":{ + "files":[ + [ + ] + ], + "citation":"", + "license":null, + "urls":[ + "http://www.google.com/trends/" + ], + "details":"Google trends results.", + "size":0 + }, + "osu_accad":{ + "files":[ + [ + "swagger1TXT.ZIP", + "handspring1TXT.ZIP", + "quickwalkTXT.ZIP", + "run1TXT.ZIP", + "sprintTXT.ZIP", + "dogwalkTXT.ZIP", + "camper_04TXT.ZIP", + "dance_KB3_TXT.ZIP", + "per20_TXT.ZIP", + "perTWO07_TXT.ZIP", + "perTWO13_TXT.ZIP", + "perTWO14_TXT.ZIP", + "perTWO15_TXT.ZIP", + "perTWO16_TXT.ZIP" + ], + [ + "connections.txt" + ] + ], + "license":"Data is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).", + "citation":"The Open Motion Data Project by The Ohio State University Advanced Computing Center for the Arts and Design, http://accad.osu.edu/research/mocap/mocap_data.htm.", + "details":"Motion capture data of different motions from the Open Motion Data Project at Ohio State University.", + "urls":[ + "http://accad.osu.edu/research/mocap/data/", + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/stick/" + ], + "size":15922790 + }, + "isomap_face_data":{ + "files":[ + [ + "face_data.mat" + ] + ], + "license":null, + "citation":"A Global Geometric Framework for Nonlinear Dimensionality Reduction, J. B. Tenenbaum, V. de Silva and J. C. Langford, Science 290 (5500): 2319-2323, 22 December 2000", + "details":"Face data made available by Tenenbaum, de Silva and Langford to demonstrate isomap, available from http://isomap.stanford.edu/datasets.html.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/isomap_face_data/" + ], + "size":24229368 + }, + "boston_housing":{ + "files":[ + [ + "Index", + "housing.data", + "housing.names" + ] + ], + "license":null, + "citation":"Harrison, D. and Rubinfeld, D.L. 'Hedonic prices and the demand for clean air', J. Environ. Economics & Management, vol.5, 81-102, 1978.", + "details":"The Boston Housing data relates house values in Boston to a range of input variables.", + "urls":[ + "http://archive.ics.uci.edu/ml/machine-learning-databases/housing/" + ], + "size":51276 + }, + "cmu_mocap_full":{ + "files":[ + [ + "allasfamc.zip" + ] + ], + "license":"From http://mocap.cs.cmu.edu. This data is free for use in research projects. You may include this data in commercially-sold products, but you may not resell this data directly, even in converted form. If you publish results obtained using this data, we would appreciate it if you would send the citation to your published paper to jkh+mocap@cs.cmu.edu, and also would add this text to your acknowledgments section: The data used in this project was obtained from mocap.cs.cmu.edu. The database was created with funding from NSF EIA-0196217.", + "citation":"Please include this in your acknowledgements: The data used in this project was obtained from mocap.cs.cmu.edu.\nThe database was created with funding from NSF EIA-0196217.", + "details":"CMU Motion Capture data base. Captured by a Vicon motion capture system consisting of 12 infrared MX-40 cameras, each of which is capable of recording at 120 Hz with images of 4 megapixel resolution. Motions are captured in a working volume of approximately 3m x 8m. The capture subject wears 41 markers and a stylish black garment.", + "urls":[ + "http://mocap.cs.cmu.edu/subjects" + ], + "size":null + }, + "brendan_faces":{ + "files":[ + [ + "frey_rawface.mat" + ] + ], + "license":null, + "citation":"Frey, B. J., Colmenarez, A and Huang, T. S. Mixtures of Local Linear Subspaces for Face Recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition 1998, 32-37, June 1998. Computer Society Press, Los Alamitos, CA.", + "details":"A video of Brendan Frey's face popularized as a benchmark for visualization by the Locally Linear Embedding.", + "urls":[ + "http://www.cs.nyu.edu/~roweis/data/" + ], + "size":1100584 + }, + "olympic_marathon_men":{ + "files":[ + [ + "olympicMarathonTimes.csv" + ] + ], + "license":null, + "citation":null, + "details":"Olympic mens' marathon gold medal winning times from 1896 to 2012. Time given in pace (minutes per kilometer). Data is originally downloaded and collated from Wikipedia, we are not responsible for errors in the data", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/olympic_marathon_men/" + ], + "size":584 + }, + "pumadyn-32nm":{ + "files":[ + [ + "pumadyn-32nm.tar.gz" + ] + ], + "license":"Data is made available by the Delve system at the University of Toronto", + "citation":"Created by Zoubin Ghahramani using the Matlab Robotics Toolbox of Peter Corke. Corke, P. I. (1996). A Robotics Toolbox for MATLAB. IEEE Robotics and Automation Magazine, 3 (1): 24-32.", + "details":"Pumadyn non linear 32 input data set with moderate noise. See http://www.cs.utoronto.ca/~delve/data/pumadyn/desc.html for details.", + "urls":[ + "ftp://ftp.cs.toronto.edu/pub/neuron/delve/data/tarfiles/pumadyn-family/" + ], + "size":5861646 + }, + "ripley_prnn_data":{ + "files":[ + [ + "Cushings.dat", + "README", + "crabs.dat", + "fglass.dat", + "fglass.grp", + "pima.te", + "pima.tr", + "pima.tr2", + "synth.te", + "synth.tr", + "viruses.dat", + "virus3.dat" + ] + ], + "license":null, + "citation":"Pattern Recognition and Neural Networks by B.D. Ripley (1996) Cambridge University Press ISBN 0 521 46986 7", + "details":"Data sets from Brian Ripley's Pattern Recognition and Neural Networks", + "urls":[ + "http://www.stats.ox.ac.uk/pub/PRNN/" + ], + "size":93565 + }, + "three_phase_oil_flow":{ + "files":[ + [ + "DataTrnLbls.txt", + "DataTrn.txt", + "DataTst.txt", + "DataTstLbls.txt", + "DataVdn.txt", + "DataVdnLbls.txt" + ] + ], + "license":null, + "citation":"Bishop, C. M. and G. D. James (1993). Analysis of multiphase flows using dual-energy gamma densitometry and neural networks. Nuclear Instruments and Methods in Physics Research A327, 580-593", + "details":"The three phase oil data used initially for demonstrating the Generative Topographic mapping.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/three_phase_oil_flow/" + ], + "size":712796 + }, + "robot_wireless":{ + "files":[ + [ + "uw-floor.txt" + ] + ], + "license":null, + "citation":"WiFi-SLAM using Gaussian Process Latent Variable Models by Brian Ferris, Dieter Fox and Neil Lawrence in IJCAI'07 Proceedings pages 2480-2485. Data used in A Unifying Probabilistic Perspective for Spectral Dimensionality Reduction: Insights and New Models by Neil D. Lawrence, JMLR 13 pg 1609--1638, 2012.", + "details":"Data created by Brian Ferris and Dieter Fox. Consists of WiFi access point strengths taken during a circuit of the Paul Allen building at the University of Washington.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/robot_wireless/" + ], + "size":284390 + }, + "xw_pen":{ + "files":[ + [ + "xw_pen_15.csv" + ] + ], + "license":null, + "citation":"Michael E. Tipping and Neil D. Lawrence. Variational inference for Student-t models: Robust Bayesian interpolation and generalised component analysis. Neurocomputing, 69:123--141, 2005", + "details":"Accelerometer pen data used for robust regression by Tipping and Lawrence.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/xw_pen/" + ], + "size":3410 + }, + "swiss_roll":{ + "files":[ + [ + "swiss_roll_data.mat" + ] + ], + "license":null, + "citation":"A Global Geometric Framework for Nonlinear Dimensionality Reduction, J. B. Tenenbaum, V. de Silva and J. C. Langford, Science 290 (5500): 2319-2323, 22 December 2000", + "details":"Swiss roll data made available by Tenenbaum, de Silva and Langford to demonstrate isomap, available from http://isomap.stanford.edu/datasets.html.", + "urls":[ + "http://isomap.stanford.edu/" + ], + "size":800256 + }, + "osu_run1":{ + "files":[ + [ + "run1TXT.ZIP" + ], + [ + "connections.txt" + ] + ], + "license":"Data is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).", + "citation":"The Open Motion Data Project by The Ohio State University Advanced Computing Center for the Arts and Design, http://accad.osu.edu/research/mocap/mocap_data.htm.", + "details":"Motion capture data of a stick man running from the Open Motion Data Project at Ohio State University.", + "urls":[ + "http://accad.osu.edu/research/mocap/data/", + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/stick/" + ], + "size":338103 + }, + "creep_rupture":{ + "files":[ + [ + "creeprupt.tar" + ] + ], + "license":null, + "citation":"Materials Algorithms Project Data Library: MAP_DATA_CREEP_RUPTURE. F. Brun and T. Yoshida.", + "details":"Provides 2066 creep rupture test results of steels (mainly of two kinds of steels: 2.25Cr and 9-12 wt% Cr ferritic steels). See http://www.msm.cam.ac.uk/map/data/materials/creeprupt-b.html.", + "urls":[ + "http://www.msm.cam.ac.uk/map/data/tar/" + ], + "size":602797 + }, + "olivetti_faces":{ + "files":[ + [ + "att_faces.zip" + ], + [ + "olivettifaces.mat" + ] + ], + "license":null, + "citation":"Ferdinando Samaria and Andy Harter, Parameterisation of a Stochastic Model for Human Face Identification. Proceedings of 2nd IEEE Workshop on Applications of Computer Vision, Sarasota FL, December 1994", + "details":"Olivetti Research Labs Face data base, acquired between December 1992 and December 1994 in the Olivetti Research Lab, Cambridge (which later became AT&T Laboratories, Cambridge). When using these images please give credit to AT&T Laboratories, Cambridge. ", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/olivetti_faces/", + "http://www.cs.nyu.edu/~roweis/data/" + ], + "size":8561331 + }, + "olivetti_glasses":{ + "files":[ + [ + "has_glasses.np" + ], + [ + "olivettifaces.mat" + ] + ], + "license":null, + "citation":"Information recorded in olivetti_faces entry. Should be used from there.", + "details":"Information recorded in olivetti_faces entry. Should be used from there.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/olivetti_faces/", + "http://www.cs.nyu.edu/~roweis/data/" + ], + "size":4261047 + }, + "della_gatta":{ + "files":[ + [ + "DellaGattadata.mat" + ] + ], + "license":null, + "citation":"Direct targets of the TRP63 transcription factor revealed by a combination of gene expression profiling and reverse engineering. Giusy Della Gatta, Mukesh Bansal, Alberto Ambesi-Impiombato, Dario Antonini, Caterina Missero, and Diego di Bernardo, Genome Research 2008", + "details":"The full gene expression data set from della Gatta et al (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2413161/) processed by RMA.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/della_gatta/" + ], + "size":3729650 + }, + "epomeo_gpx":{ + "files":[ + [ + "endomondo_1.gpx", + "endomondo_2.gpx", + "garmin_watch_via_endomondo.gpx", + "viewranger_phone.gpx", + "viewranger_tablet.gpx" + ] + ], + "license":null, + "citation":"", + "details":"Five different GPS traces of the same run up Mount Epomeo in Ischia. The traces are from different sources. endomondo_1 and endomondo_2 are traces from the mobile phone app Endomondo, with a split in the middle. garmin_watch_via_endomondo is the trace from a Garmin watch, with a segment missing about 4 kilometers in. viewranger_phone and viewranger_tablet are traces from a phone and a tablet through the viewranger app. The viewranger_phone data comes from the same mobile phone as the Endomondo data (i.e. there are 3 GPS devices, but one device recorded two traces).", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/epomeo_gpx/" + ], + "size":2031872 + }, + "mauna_loa":{ + "files":[ + [ + "co2_mm_mlo.txt" + ] + ], + "license":"-------------------------------------------------------------------- USE OF NOAA ESRL DATA\n\n These data are made freely available to the public and the scientific community in the belief that their wide dissemination will lead to greater understanding and new scientific insights. The availability of these data does not constitute publication of the data. NOAA relies on the ethics and integrity of the user to insure that ESRL receives fair credit for their work. If the data are obtained for potential use in a publication or presentation, ESRL should be informed at the outset of the nature of this work. If the ESRL data are essential to the work, or if an important result or conclusion depends on the ESRL data, co-authorship may be appropriate. This should be discussed at an early stage in the work. Manuscripts using the ESRL data should be sent to ESRL for review before they are submitted for publication so we can insure that the quality and limitations of the data are accurately represented.\n\n Contact: Pieter Tans (303 497 6678; pieter.tans@noaa.gov)\n\n RECIPROCITY Use of these data implies an agreement to reciprocate. Laboratories making similar measurements agree to make their own data available to the general public and to the scientific community in an equally complete and easily accessible form. Modelers are encouraged to make available to the community, upon request, their own tools used in the interpretation of the ESRL data, namely well documented model code, transport fields, and additional information necessary for other scientists to repeat the work and to run modified versions. Model availability includes collaborative support for new users of the models.\n --------------------------------------------------------------------\n\n See www.esrl.noaa.gov/gmd/ccgg/trends/ for additional details.", + "citation":"Mauna Loa Data. Dr. Pieter Tans, NOAA/ESRL (www.esrl.noaa.gov/gmd/ccgg/trends/) and Dr. Ralph Keeling, Scripps Institution of Oceanography (scrippsco2.ucsd.edu/).", + "details":"The 'average' column contains the monthly mean CO2 mole fraction determined from daily averages. The mole fraction of CO2, expressed as parts per million (ppm) is the number of molecules of CO2 in every one million molecules of dried air (water vapor removed). If there are missing days concentrated either early or late in the month, the monthly mean is corrected to the middle of the month using the average seasonal cycle. Missing months are denoted by -99.99. The 'interpolated' column includes average values from the preceding column and interpolated values where data are missing. Interpolated values are computed in two steps. First, we compute for each month the average seasonal cycle in a 7-year window around each monthly value. In this way the seasonal cycle is allowed to change slowly over time. We then determine the 'trend' value for each month by removing the seasonal cycle; this result is shown in the 'trend' column. Trend values are linearly interpolated for missing months. The interpolated monthly mean is then the sum of the average seasonal cycle value and the trend value for the missing month.\n\nNOTE: In general, the data presented for the last year are subject to change, depending on recalibration of the reference gas mixtures used, and other quality control procedures. Occasionally, earlier years may also be changed for the same reasons. Usually these changes are minor.\n\nCO2 expressed as a mole fraction in dry air, micromol/mol, abbreviated as ppm \n\n (-99.99 missing data; -1 no data for daily means in month)", + "urls":[ + "ftp://aftp.cmdl.noaa.gov/products/trends/co2/" + ], + "size":46779 + }, + "boxjenkins_airline":{ + "files":[ + [ + "boxjenkins_airline.csv" + ] + ], + "license":"You may copy and redistribute the data. You may make derivative works from the data. You may use the data for commercial purposes. You may not sublicence the data when redistributing it. You may not redistribute the data under a different license. Source attribution on any use of this data: Must refer source.", + "citation":"Box & Jenkins (1976), in file: data/airpass, Description: International airline passengers: monthly totals in thousands. Jan 49 – Dec 60", + "details":"International airline passengers, monthly totals from January 1949 to December 1960.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/boxjenkins_airline/" + ], + "size":46779 + }, + + "decampos_characters":{ + "files":[ + [ + "characters.npy", + "digits.npy" + ] + ], + "license":null, + "citation":"T. de Campos, B. R. Babu, and M. Varma. Character recognition in natural images. VISAPP 2009.", + "details":"Examples of hand written digits taken from the de Campos et al paper on Character Recognition in Natural Images.", + "urls":[ + "http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/decampos_digits/" + ], + "size":2031872 + } +}