mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-24 20:36:23 +02:00
[init] updated readme
This commit is contained in:
parent
77b4325934
commit
0037244b5f
2 changed files with 8 additions and 5 deletions
11
README.md
11
README.md
|
|
@ -130,12 +130,15 @@ m.optimize()
|
|||
np.save('model_save.npy', m.param_array)
|
||||
# 2: loading a model
|
||||
# Model creation, without initialization:
|
||||
m = GPy.models(GPRegression(X,Y,initialize=False)
|
||||
m[:] = np.load('model_save.npy')
|
||||
m.initialize_parameter()
|
||||
print m
|
||||
m_load = GPy.models.GPRegression(X, Y, initialize=False)
|
||||
m_load.update_model(False) # do not call the underlying expensive algebra on load
|
||||
m_load.initialize_parameter() # Initialize the parameters (connect the parameters up)
|
||||
m_load[:] = np.load('model_save.npy') # Load the parameters
|
||||
m_load.update_model(True) # Call the algebra only once
|
||||
print(m_load)
|
||||
```
|
||||
|
||||
|
||||
## Running unit tests:
|
||||
|
||||
Ensure nose is installed via pip:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue