def plotPolinomio(thetaFile): O = regresion.readTheta(thetaFile) tx = np.arange(mpf(0.0),mpf(24.5),mpf(0.1)) ty = tx res = regresion.getCurvaNivel(tx,ty,O) for i in range(0,len(res[0])): plotPoint(res[0][i],res[1][i],'yellow',POINT_POLI_RADIO)
print blue_points elif(comandos[1] == 'red'): print red_points elif(comandos[1] == 'ans'): print ans elif(comandos[1] == 'mem'): print mem elif(comandos[0] == 'rt'): file = comandos[1] n = int(comandos[2]) regresion.generarRandom(n,file) print "Thetas generadas correctamente" elif(comandos[0] == 'go'): file = comandos[1] n = int(comandos[2]) O = regresion.readTheta(file) temp = regresion.graficar(O,red_points,blue_points,n) commands.getoutput('display ' + temp) elif(comandos[0] == 'run'): file = comandos[1] n = int(comandos[2]) regresion.alfa = float(comandos[3]) regresion.half_life = float(comandos[4]) points = regresion.unirPuntos(red_points,blue_points,regresion.getThetaSize(file)) regresion.regresionFile(file,points[0],points[1],n) print "Iteraciones terminadas con exito" elif(comandos[0] == 'runr'): file = comandos[1] n = int(comandos[2]) iteraciones = int(comandos[3]) regresion.generarRandom(n,file)