Beruflich Dokumente
Kultur Dokumente
Inteligencia Artificial
Quiz Covid 19
Ingenieria de Software
codigo sof320191013
In [2]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import random
In [4]:
p=np.array([[2.8,3.5,3,3.8,1.9,2,2.2,2.3,1.5,1,1.7,1.2],[38.1,38.9,38.5,38.9,38.5,38,39,38.
z=np.array([[2.8,3.5,3,3.8,1.9,2,2.2,2.3,1.5,1,1.7,1.2],[38.1,38.9,38.5,38.9,38.5,38,39,38.
t=np.array([[-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1],[-1,-1,-1,-1,1,1,1,1,1,1,1,1]])
tv=np.array([[0,0,0,0,0,0,0,0,1,1,1,1],[0,0,0,0,1,1,1,1,1,1,1,1]])
In [12]:
In [13]:
print(Err)
[-0.40936278 -0.41713485]
[-1.39282345 -0.87826055]
[-0.88318565 -0.444719 ]
[-1.42863838 -1.28421794]
[-0.75186424 1.04379142]
[-0.20136973 0.60465466]
[-1.35011198 0.94165166]
[-0.46215779 0.32022433]
[0.98318745 0.67361506]
[0.70541931 1.53250128]
[0.50936457 0.6460309 ]
[0.68154269 1.26186302]
[[-1. -1. -1. -1. -1. -1. -1. -1. 0. 0. 0. 0.]
[-1. -1. -1. -1. 0. 0. 0. 0. 0. 0. 0. 0.]]
In [14]:
#Ingresamosvalores para que con nuestra condicion pueda identificar y clasificar en el plan
x=np.array([[2.2,39],[2.3,38.2],[1.5,3.7],[1,37.3],[1.7,37.4],[1.2,37.3]])
x0=np.array([[2.8,38.1],[3.5,38.9],[3,38.5],[3.8,38.9],[1.9,38.5],[2,38]])
x1=np.arange(np.min(x[0:6,0]),np.max(x0[0:6,0]+0.5),0.1)
x2 = -1 * (x1 * w[0][0] + b[0]) / w[0][1]
x3=np.arange(np.min(x[0:6,0]),np.max(x0[0:6,0]+0.5),0.1)
x4 = -1* (x3 * w[1][0] + b[1]) / w[1][1]
#SELECIONAMOS LAS CARACTERISTICAS PARA QUE NUESTRA RED NEURONAL PARA IDENTIFICAR EL COVID 1
#color
#simbolo y ubicacion en el plano
plt.plot(x1,x2,'green')
plt.plot(x3,x4,'green')
Out[14]:
[<matplotlib.lines.Line2D at 0x1f396227b08>]
In [ ]: