Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyKriging/coKriging.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def distanceXcXe(self):


def updatePsi(self):
self.PsicXc = np.zeros((self.nc,self.nc), dtype=np.float)
self.PsicXe = np.zeros((self.ne,self.ne), dtype=np.float)
self.PsicXcXe = np.zeros((self.nc,self.ne), dtype=np.float)
self.PsicXc = np.zeros((self.nc,self.nc), dtype=float)
self.PsicXe = np.zeros((self.ne,self.ne), dtype=float)
self.PsicXcXe = np.zeros((self.nc,self.ne), dtype=float)
#
# print self.thetac
# print self.pc
Expand Down
4 changes: 2 additions & 2 deletions pyKriging/krige.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def expimp(self, x):
y_min = np.min(self.y)
if S <= 0.:
EI = 0.
elif S > 0.:
else:
EI_one = ((y_min - self.predict_normalized(x)) * (0.5 + 0.5*m.erf((
1./np.sqrt(2.))*((y_min - self.predict_normalized(x)) /
S))))
Expand All @@ -223,7 +223,7 @@ def weightedexpimp(self, x, w):
y_min = np.min(self.y)
if S <= 0.:
EI = 0.
elif S > 0.:
else:
EI_one = w*((y_min - self.predict_normalized(x)) * (0.5 +
0.5*m.erf((1./np.sqrt(2.))*((y_min -
self.predict_normalized(x)) / S))))
Expand Down
8 changes: 4 additions & 4 deletions pyKriging/matrixops.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class matrixops():

def __init__(self):
self.LnDetPsi = None
self.Psi = np.zeros((self.n,self.n), dtype=np.float)
self.Psi = np.zeros((self.n,self.n), dtype=float)
self.psi = np.zeros((self.n,1))
self.one = np.ones(self.n)
self.mu = None
Expand All @@ -22,7 +22,7 @@ def updateData(self):
self.distance[i,j]= np.abs((self.X[i]-self.X[j]))

def updatePsi(self):
self.Psi = np.zeros((self.n,self.n), dtype=np.float)
self.Psi = np.zeros((self.n,self.n), dtype=float)
self.one = np.ones(self.n)
self.psi = np.zeros((self.n,1))
newPsi = np.exp(-np.sum(self.theta*np.power(self.distance,self.pl), axis=2))
Expand All @@ -32,7 +32,7 @@ def updatePsi(self):
self.U = self.U.T

def regupdatePsi(self):
self.Psi = np.zeros((self.n,self.n), dtype=np.float)
self.Psi = np.zeros((self.n,self.n), dtype=float)
self.one = np.ones(self.n)
self.psi = np.zeros((self.n,1))
newPsi = np.exp(-np.sum(self.theta*np.power(self.distance,self.pl), axis=2))
Expand Down Expand Up @@ -107,4 +107,4 @@ def regression_predicterr_normalized(self,x):
pass

SSqr = np.abs(SSqr[0])
return np.power(SSqr,0.5)[0]
return np.power(SSqr,0.5)[0]