#CONDIÇÃO 1: KNN=ANN PARA FALHASif yk ==0and X1 ==True: # KNN=ANN PARA NORMAISprint('KNN e Rede Neural - Amostra normal')if yk !=0and X1 !=True: # KNN=ANN PARA FALHASprint('KNN e Reunral - Prossiga a análise')if yk ==0and X2 ==Trueor X3 ==True: # KNN=NORMAL E ANN=FALHAprint('Realise análise da evolução dos gases - TENDÊNCIA A FALHAS - Rede Neural')if yk !=0and X1 ==True: # KNN=FALHA E ANN=NORMALprint('Realise análise da evolução dos gases - TENDÊNCIA A FALHAS - K-Vizinhos')
Tipo de Falha
for yr in (RNN_DGA.predict(x_Normalizado)):if X1 ==Falseand X2 ==Falseand X3 ==True:print('REDE NEURAL: Defeito elétrico')#print("\n")if yk ==1:print('K-VIZINHOS: Defeito térmico')for yd in duval(x_test).replace("", ""):print(yd, end="")
Testes SDI
# Diagrama de Blocos - Sistema de Diagnóstico Inteligente - SDIfor yk in (KNN_DGA.predict(x_Normalizado)):if yk ==0:print('Amostra normal')print("\n")breakfor yr in (RNN_DGA.predict(x_Normalizado)):if X1 ==Trueand X2 ==Falseand X3 ==False:print('REDE NEURAL: Realizar nova coleta de óleo - Discordância entre KNN e ANN')print("\n")breakfor yr in (RNN_DGA.predict(x_Normalizado)):if X1 ==Falseand X2 ==Trueand X3 ==False:print('REDE NEURAL: Defeito térmico')#print("\n")for yr in (RNN_DGA.predict(x_Normalizado)):if X1 ==Falseand X2 ==Falseand X3 ==True:print('REDE NEURAL: Defeito elétrico')#print("\n")if yk ==1:print('K-VIZINHOS: Defeito térmico')for yd in duval(x_test).replace("", ""):print(yd, end="")
Interface Gráfica
from IPython.core.display import display, Markdown, clear_outputimport matplotlib.pyplot as pltimport ipywidgets as widgetsfrom logging import PlaceHolder
---------------------------------------------------------------------------NameError Traceback (most recent call last)
<ipython-input-73-b54efe859ba1> in <cell line: 1>()----> 1grapher = widgets.VBox([points1, points2, points3, points4, points5, button, out, Text_diagnostico])NameError: name 'button' is not defined
info = Markdown("""# Sistema de Diagnóstico Inteligente - SDI - Digite a amostra gascromatográfica. - Aperte diagnóstico.""")
display(info, grapher)
---------------------------------------------------------------------------NameError Traceback (most recent call last)
<ipython-input-75-ecc5b9db6586> in <cell line: 1>()----> 1display(info, grapher)NameError: name 'grapher' is not defined