Created
December 28, 2018 09:01
-
-
Save eponkratova/0cb4c28b1e7f47c6eb88af3b03ee20b0 to your computer and use it in GitHub Desktop.
initiating_gis_3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __target(self, x, unit): | |
""" | |
Theta target function for one unit | |
:param x: combined weights | |
:param unit: which production unit to compute | |
:return: theta | |
""" | |
in_w, out_w, lambdas = x[:self.m], x[self.m:(self.m+self.r)], x[(self.m+self.r):] # unroll the weights | |
denominator = np.dot(self.inputs[unit], in_w) | |
numerator = np.dot(self.outputs[unit], out_w) | |
return numerator/denominator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment