Skip to content

Instantly share code, notes, and snippets.

@eponkratova
Created December 28, 2018 09:01
Show Gist options
  • Save eponkratova/0cb4c28b1e7f47c6eb88af3b03ee20b0 to your computer and use it in GitHub Desktop.
Save eponkratova/0cb4c28b1e7f47c6eb88af3b03ee20b0 to your computer and use it in GitHub Desktop.
initiating_gis_3
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