From 0c51239bddfcd2411b619d5790b290eded507c68 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Fri, 24 Jan 2014 10:18:13 +0000 Subject: [PATCH] removed fitc_classification modle --- GPy/models/__init__.py | 1 - GPy/models/fitc_classification.py | 47 ------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 GPy/models/fitc_classification.py diff --git a/GPy/models/__init__.py b/GPy/models/__init__.py index 10ce577b..047658a4 100644 --- a/GPy/models/__init__.py +++ b/GPy/models/__init__.py @@ -6,7 +6,6 @@ from gp_classification import GPClassification from sparse_gp_regression import SparseGPRegression from svigp_regression import SVIGPRegression from sparse_gp_classification import SparseGPClassification -from fitc_classification import FITCClassification from gplvm import GPLVM from bcgplvm import BCGPLVM from sparse_gplvm import SparseGPLVM diff --git a/GPy/models/fitc_classification.py b/GPy/models/fitc_classification.py deleted file mode 100644 index ee92a1b4..00000000 --- a/GPy/models/fitc_classification.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2013, Ricardo Andrade -# Licensed under the BSD 3-clause license (see LICENSE.txt) - - -import numpy as np -from ..core import FITC -from .. import likelihoods -from .. import kern -from ..likelihoods import likelihood - -class FITCClassification(FITC): - """ - FITC approximation for classification - - This is a thin wrapper around the FITC class, with a set of sensible defaults - - :param X: input observations - :param Y: observed values - :param likelihood: a GPy likelihood, defaults to Binomial with probit link function - :param kernel: a GPy kernel, defaults to rbf+white - :param normalize_X: whether to normalize the input data before computing (predictions will be in original scales) - :type normalize_X: False|True - :param normalize_Y: whether to normalize the input data before computing (predictions will be in original scales) - :type normalize_Y: False|True - :rtype: model object - - """ - - def __init__(self, X, Y=None, likelihood=None, kernel=None, normalize_X=False, normalize_Y=False, Z=None, num_inducing=10): - if kernel is None: - kernel = kern.rbf(X.shape[1]) + kern.white(X.shape[1],1e-3) - - if likelihood is None: - noise_model = likelihoods.binomial() - likelihood = likelihoods.EP(Y, noise_model) - elif Y is not None: - if not all(Y.flatten() == likelihood.data.flatten()): - raise Warning, 'likelihood.data and Y are different.' - - if Z is None: - i = np.random.permutation(X.shape[0])[:num_inducing] - Z = X[i].copy() - else: - assert Z.shape[1]==X.shape[1] - - FITC.__init__(self, X, likelihood, kernel, Z=Z, normalize_X=normalize_X) - self.ensure_default_constraints()