This file contains hidden or 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
| """ | |
| Modulo format-cnpj | |
| """ | |
| def fmtCnpj(inStr:str)->str: | |
| """ | |
| Formata Cnpj para tradicional formatação ##.####.###/#####-## | |
| """ | |
| inStr = inStr.replace('.','').replace('-','').replace('/','') | |
| ret = '' | |
| inStr = '00000000000' + inStr |
This file contains hidden or 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
| from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error | |
| def show_metricas(y_test,y_pred,rounding:int = 3): | |
| m = { | |
| "MAE":("Erro Absoluto Médio [MAE]" , mean_absolute_error), | |
| "MSE":("Erro Quadratico Médio [MSE]",mean_squared_error), | |
| "RMSE":("variancia", lambda x,y :(mean_squared_error(x,y,squared=False))), | |
| "R2":("R^2", r2_score), | |
| "MAPE":("MAPE", lambda x,y: ((abs(x-y)/x).mean())) | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.