Project

General

Profile

Error.py

Funçao utilizada para o cálculo do erro entre as saídas reais e modeladas - Gabriel José Negrelli Gomes, 12/27/2017 07:53 PM

Download (362 Bytes)

 
1
# -*- coding: utf-8 -*-
2
"""
3
Created on Fri Mar 24 00:11:20 2017
4
Least square erro
5
University of Sao Paulo
6
@author: Gabriel
7
"""
8

    
9
def Error(y,x):
10
    err = 0
11
    if y.shape == x.shape:
12
        for i in (y - x)**2:
13
            for j in i:
14
                err += j
15
        return err
16
    else:
17
        print("Error: Arrays must have the same shapes")