Commit cb32f9cc authored by Adam Fekete's avatar Adam Fekete

remove main.py from the python package

parent 1ce9b073
from ML_of_Forces.DataModel import ForceConfs
from ML_of_Forces.GP_custom_gen import GaussianProcess3 as GPvec
import numpy as np
from ML_of_Forces.ManyBodyExpansion import MBExp
data = ForceConfs()
data.read_json_data(filename='../data-mlforce/Si_TB_1000K.json')
train_confs, train_force, test_confs, test_force = data.subsampling(40, 10, random=True)
gp = GPvec(
ker=['id'],
fvecs=['cov_sim'],
nugget=1e-8,
theta0=np.array([None]),
sig=.5,
bounds=((0.1, 10.),),
optimizer=None,
calc_error=True,
eval_grad=False,
)
print(train_confs.shape)
gp.fit(train_confs, train_force)
pred_force, var_force = gp.predict(test_confs)
# print(pred_force)
# print(test_force)
# error = np.sqrt(np.sum((pred_force - test_force)**2, axis=1))
# print(error.shape)
# print(var_force)
# print(train_confs)
# fit = MBExp(gp)
#
# fit.PW_S_fit(0.1,4)
#
# fit.pair_potential_scalars(0.1, 4, Delta_d=0.1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment