4
$\begingroup$

I want to use the smooth overlap of atomic positions (SOAP) as a descriptor to represent the atomic environment of a specific atom to predict chemical shifts. I have generated averaged SOAPs for different molecules with the Python library DScribe. Using Gaussian Process regression as it is implemented in scikit-learn requires the training data input to be an array of the shape (n_samples, n_features). What I am asking myself at the moment is if the SOAP output (which is an array of shape (132,) for every sample) can be used as an input for sklearn.gaussian_process.GaussianProcessRegressor. While my training set consists of 20 samples at the moment (one SOAP descriptor for every sample molecule), I am not sure how to set the shape of the input array so it can be used for GPR in scikit-learn. The fitting is done by:

gpr = GaussianProcessRegressor(kernel=kernel).fit(X_train, y_train)

Is it possible to provide input for X_train in the form of a vector or array for each sample? Or is it only possible to pass scalar values ?

$\endgroup$

1 Answer 1

4
$\begingroup$

The X_train in the .fit method is accepts an array-like object of shape (n_samples, n_features) which could be a numpy array or list of object Feature vectors.

The descriptions of various arguments can be found here:

GaussianProcessRegressor-Docs

So in your case the input to the GaussianProcessRegressor would be an array of size 20x132.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .