emat/multitarget/simple.py
def _change_training_data(self, X, Y):
		"""
		Swap out X and Y in training data for new arrays.

		This method will also pass the new array references to the step1
		submodels.

		The replacement Y should be pre-standardized if the previous
		Y was standardized.
		"""
		self.X_train_ = numpy.copy(X) if self.copy_X_train else X
		self.Y_train_ = numpy.copy(Y) if (self.copy_X_train or self.standardize_before_fit) else Y

		if hasattr(self, 'step1'):
			for n, estimator in enumerate(self.step1.estimators_):
				estimator.X_train_ = self.X_train_
				estimator.y_train_ = self.Y_train_[:,n]

				# Precompute quantities required for predictions which are independent
				# of actual query points
				K = estimator.kernel_(estimator.X_train_)
				K[numpy.diag_indices_from(K)] += estimator.alpha
				try:
					estimator.L_ = cholesky(K, lower=True)  # Line 2
					estimator._K_inv = None  # because self.L_ changed
				except numpy.linalg.LinAlgError as exc:
					exc.args = ("The kernel, %s, is not returning a "
								"positive definite matrix. Try gradually "
								"increasing the 'alpha' parameter of your "
								"GaussianProcessRegressor estimator."
								% estimator.kernel_,) + exc.args
					raise
				estimator.alpha_ = cho_solve((estimator.L_, True), estimator.y_train_)

		Swap out X and Y in training data for new arrays.

		This method will also pass the new array references to the step1
		submodels.

		The replacement Y should be pre-standardized if the previous
		Y was standardized.
		
Swap out X and Y in training data for new arrays.
This method will also pass the new array references to the step1
submodels.

The replacement Y should be pre-standardized if the previous
Y was standardized.
Swap out X and Y in training data for new arrays . This method will also pass the new array references to the step1 submodels . The replacement Y should be pre - standardized if the previous Y was standardized .
def _change_training_data(self, X, Y):
		self.X_train_ = numpy.copy(X) if self.copy_X_train else X
		self.Y_train_ = numpy.copy(Y) if (self.copy_X_train or self.standardize_before_fit) else Y
		if hasattr(self, 'step1'):
			for n, estimator in enumerate(self.step1.estimators_):
				estimator.X_train_ = self.X_train_
				estimator.y_train_ = self.Y_train_[:,n]
				K = estimator.kernel_(estimator.X_train_)
				K[numpy.diag_indices_from(K)] += estimator.alpha
				try:
					estimator.L_ = cholesky(K, lower=True)  
					estimator._K_inv = None  
				except numpy.linalg.LinAlgError as exc:
					exc.args = ("The kernel, %s, is not returning a "
								"positive definite matrix. Try gradually "
								"increasing the 'alpha' parameter of your "
								"GaussianProcessRegressor estimator."
								% estimator.kernel_,) + exc.args
					raise
				estimator.alpha_ = cho_solve((estimator.L_, True), estimator.y_train_)
def _change_training_data ( self , X , Y ) : self . X_train_ = numpy . copy ( X ) if self . copy_X_train else X self . Y_train_ = numpy . copy ( Y ) if ( self . copy_X_train or self . standardize_before_fit ) else Y if hasattr ( self , 'step1' ) : for n , estimator in enumerate ( self . step1 . estimators_ ) : estimator . X_train_ = self . X_train_ estimator . y_train_ = self . Y_train_ [ : , n ] K = estimator . kernel_ ( estimator . X_train_ ) K [ numpy . diag_indices_from ( K ) ] += estimator . alpha try : estimator . L_ = cholesky ( K , lower = True ) estimator . _K_inv = None except numpy . linalg . LinAlgError as exc : exc . args = ( "The kernel, %s, is not returning a " "positive definite matrix. Try gradually " "increasing the 'alpha' parameter of your " "GaussianProcessRegressor estimator." % estimator . kernel_ , ) + exc . args raise estimator . alpha_ = cho_solve ( ( estimator . L_ , True ) , estimator . y_train_ )
Swap out X and Y in training data for new arrays.
Swap out X and Y in training data for new arrays .
"""
		Swap out X and Y in training data for new arrays.

		This method will also pass the new array references to the step1
		submodels.

		The replacement Y should be pre-standardized if the previous
		Y was standardized.
		""" # Precompute quantities required for predictions which are independent # of actual query points # Line 2 # because self.L_ changed
self
X
Y