def _RMSE(self, y, y_pred): lower = 0.0 upper = 0.0 tot = 0.0 for val in range(len(y)): lower += (y[val][0].lower() - y_pred[val].lower()) upper += (y[val][0].upper() - y_pred[val].upper()) lower = (lower**2.0 / len(y))**(1.0 / 2.0) upper = (upper**2.0 / len(y))**(1.0 / 2.0) return lower, upper if __name__ == "__main__": Rdmia.setDotPrecision(2) ''' x = Rdmia.array([[Rdmia.number(1),Rdmia.number(90,100)], [Rdmia.number(1),Rdmia.number(90,130)], [Rdmia.number(1),Rdmia.number(140,180)], [Rdmia.number(1),Rdmia.number(110,142)], [Rdmia.number(1),Rdmia.number(90,100)], [Rdmia.number(1),Rdmia.number(130,160)], [Rdmia.number(1),Rdmia.number(60,100)], [Rdmia.number(1),Rdmia.number(130,160)], [Rdmia.number(1),Rdmia.number(110,190)], [Rdmia.number(1),Rdmia.number(138,180)], [Rdmia.number(1),Rdmia.number(110,150)]]) x = [[Rdmia.number(1),Rdmia.number(90,100)],
r = [] return result #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if __name__ == "__main__": # standalone test -- import sys import json dims = [2, 3] #dimensions nstep = 50 #iterations seed = 1 init = 1 rdmia.setDotPrecision(0.1) print("PRECISION: ", rdmia.precision()) problems = {} # to change these params in sh or ipython, run this.py a=1 b=None c=[3] ... for arg in sys.argv[1:]: exec(arg) np.set_printoptions( threshold=20, edgeitems=5, linewidth=120, suppress=True, formatter=dict(float=lambda x: "%.2g" % x)) # float arrays %.2g np.random.seed(seed)