Teoría

Una Red Neuronal Artificial (ANN) modela la relación entre un conjunto de entradas y una salida, resolviendo un problema de aprendizaje.

Algunos ejemplos de aplicación de ANN son:

  • La recomendación de contenido de Netflix.
  • El feed de Instagram.
  • Determinar el número escrito a mano.

Ejercicio 1. ¿Pasé la materia?

1. Instalar maquetes y librerías

#install.packages("neuralnet")
library(neuralnet)

2. Genera el data frame

examen <- c(20,10,30,20,80,30)
proyecto <- c(90,20,40,50,50,80)
estatus <- c(1,0,0,0,0,1)
df1 <- data.frame(examen, proyecto, estatus)

3. Generar la Red Neuronal

rn1 <- neuralnet(estatus ~., data=df1)
plot(rn1, rep= "best")

4. Predecir resultados

prueba_examen <- c(30,40,85)
prueba_proyecto <- c(85,50,40)
prueba1 <- data.frame(prueba_examen, prueba_proyecto)
prediccion <- compute(rn1, prueba1)
prediccion$net.result
##           [,1]
## [1,] 0.3337072
## [2,] 0.3337072
## [3,] 0.3337072
probabilidad <- prediccion$net.result
resultado <- ifelse(probabilidad>0.5, 1,0)
resultado
##      [,1]
## [1,]    0
## [2,]    0
## [3,]    0

Ejercicio 2. Detectar cancer de mama

2. Genera el data frame

df2 <- read.csv("/Users/david3/Desktop/cancer_de_mama.csv")
df2_subset <- df2[19:23, ]
df2_subset$diagnosis <- ifelse(df2_subset$diagnosis == "M", 1, ifelse(df2_subset$diagnosis == "B", 0, df2_subset$diagnosis))
df2_subset
##    diagnosis radius_mean texture_mean perimeter_mean area_mean smoothness_mean
## 19         1      19.810        22.15         130.00    1260.0         0.09831
## 20         0      13.540        14.36          87.46     566.3         0.09779
## 21         0      13.080        15.71          85.63     520.0         0.10750
## 22         0       9.504        12.44          60.34     273.9         0.10240
## 23         1      15.340        14.26         102.50     704.4         0.10730
##    compactness_mean concavity_mean concave.points_mean symmetry_mean
## 19          0.10270        0.14790             0.09498        0.1582
## 20          0.08129        0.06664             0.04781        0.1885
## 21          0.12700        0.04568             0.03110        0.1967
## 22          0.06492        0.02956             0.02076        0.1815
## 23          0.21350        0.20770             0.09756        0.2521
##    fractal_dimension_mean radius_se texture_se perimeter_se area_se
## 19                0.05395    0.7582     1.0170        5.865  112.40
## 20                0.05766    0.2699     0.7886        2.058   23.56
## 21                0.06811    0.1852     0.7477        1.383   14.67
## 22                0.06905    0.2773     0.9768        1.909   15.70
## 23                0.07032    0.4388     0.7096        3.384   44.91
##    smoothness_se compactness_se concavity_se concave.points_se symmetry_se
## 19      0.006494        0.01893      0.03391           0.01521     0.01356
## 20      0.008462        0.01460      0.02387           0.01315     0.01980
## 21      0.004097        0.01898      0.01698           0.00649     0.01678
## 22      0.009606        0.01432      0.01985           0.01421     0.02027
## 23      0.006789        0.05328      0.06446           0.02252     0.03672
##    fractal_dimension_se radius_worst texture_worst perimeter_worst area_worst
## 19             0.001997        27.32         30.88          186.80     2398.0
## 20             0.002300        15.11         19.26           99.70      711.2
## 21             0.002425        14.50         20.49           96.09      630.5
## 22             0.002968        10.23         15.66           65.13      314.9
## 23             0.004394        18.07         19.08          125.10      980.9
##    smoothness_worst compactness_worst concavity_worst concave.points_worst
## 19           0.1512            0.3150         0.53720              0.23880
## 20           0.1440            0.1773         0.23900              0.12880
## 21           0.1312            0.2776         0.18900              0.07283
## 22           0.1324            0.1148         0.08867              0.06227
## 23           0.1390            0.5954         0.63050              0.23930
##    symmetry_worst fractal_dimension_worst
## 19         0.2768                 0.07615
## 20         0.2977                 0.07259
## 21         0.3184                 0.08183
## 22         0.2450                 0.07773
## 23         0.4667                 0.09946

3. Generar la Red Neuronal

rn2 <- neuralnet(diagnosis ~ ., data=df2_subset)
plot(rn2, rep= "best")

4. Predecir resultados

df_prueba <- read.csv("/Users/david3/Desktop/cancer_de_mama.csv")
df_prueba$diagnosis <- ifelse(df_prueba$diagnosis == "M", 1, ifelse(df_prueba$diagnosis == "B", 0, df_prueba$diagnosis))
prediccion2 <- compute(rn2, df_prueba)
prediccion2$net.result
##             [,1]      [,2]
##   [1,] 0.6014214 0.4015901
##   [2,] 0.6014214 0.4015901
##   [3,] 0.6014214 0.4015901
##   [4,] 0.6014214 0.4015901
##   [5,] 0.6014214 0.4015901
##   [6,] 0.6014214 0.4015901
##   [7,] 0.6014214 0.4015901
##   [8,] 0.6014214 0.4015901
##   [9,] 0.6014214 0.4015901
##  [10,] 0.6014214 0.4015901
##  [11,] 0.6014214 0.4015901
##  [12,] 0.6014214 0.4015901
##  [13,] 0.6014214 0.4015901
##  [14,] 0.6014214 0.4015901
##  [15,] 0.6014214 0.4015901
##  [16,] 0.6014214 0.4015901
##  [17,] 0.6014214 0.4015901
##  [18,] 0.6014214 0.4015901
##  [19,] 0.6014214 0.4015901
##  [20,] 0.6014214 0.4015901
##  [21,] 0.6014214 0.4015901
##  [22,] 0.6014214 0.4015901
##  [23,] 0.6014214 0.4015901
##  [24,] 0.6014214 0.4015901
##  [25,] 0.6014214 0.4015901
##  [26,] 0.6014214 0.4015901
##  [27,] 0.6014214 0.4015901
##  [28,] 0.6014214 0.4015901
##  [29,] 0.6014214 0.4015901
##  [30,] 0.6014214 0.4015901
##  [31,] 0.6014214 0.4015901
##  [32,] 0.6014214 0.4015901
##  [33,] 0.6014214 0.4015901
##  [34,] 0.6014214 0.4015901
##  [35,] 0.6014214 0.4015901
##  [36,] 0.6014214 0.4015901
##  [37,] 0.6014214 0.4015901
##  [38,] 0.6014214 0.4015901
##  [39,] 0.6014214 0.4015901
##  [40,] 0.6014214 0.4015901
##  [41,] 0.6014214 0.4015901
##  [42,] 0.6014214 0.4015901
##  [43,] 0.6014214 0.4015901
##  [44,] 0.6014214 0.4015901
##  [45,] 0.6014214 0.4015901
##  [46,] 0.6014214 0.4015901
##  [47,] 0.6014214 0.4015901
##  [48,] 0.6014214 0.4015901
##  [49,] 0.6014214 0.4015901
##  [50,] 0.6014214 0.4015901
##  [51,] 0.6014214 0.4015901
##  [52,] 0.6014214 0.4015901
##  [53,] 0.6014214 0.4015901
##  [54,] 0.6014214 0.4015901
##  [55,] 0.6014214 0.4015901
##  [56,] 0.6014214 0.4015901
##  [57,] 0.6014214 0.4015901
##  [58,] 0.6014214 0.4015901
##  [59,] 0.6014214 0.4015901
##  [60,] 0.6014214 0.4015901
##  [61,] 0.6014214 0.4015901
##  [62,] 0.6014214 0.4015901
##  [63,] 0.6014214 0.4015901
##  [64,] 0.6014214 0.4015901
##  [65,] 0.6014214 0.4015901
##  [66,] 0.6014214 0.4015901
##  [67,] 0.6014214 0.4015901
##  [68,] 0.6014214 0.4015901
##  [69,] 0.6014214 0.4015901
##  [70,] 0.6014214 0.4015901
##  [71,] 0.6014214 0.4015901
##  [72,] 0.6014214 0.4015901
##  [73,] 0.6014214 0.4015901
##  [74,] 0.6014214 0.4015901
##  [75,] 0.6014214 0.4015901
##  [76,] 0.6014214 0.4015901
##  [77,] 0.6014214 0.4015901
##  [78,] 0.6014214 0.4015901
##  [79,] 0.6014214 0.4015901
##  [80,] 0.6014214 0.4015901
##  [81,] 0.6014214 0.4015901
##  [82,] 0.6014214 0.4015901
##  [83,] 0.6014214 0.4015901
##  [84,] 0.6014214 0.4015901
##  [85,] 0.6014214 0.4015901
##  [86,] 0.6014214 0.4015901
##  [87,] 0.6014214 0.4015901
##  [88,] 0.6014214 0.4015901
##  [89,] 0.6014214 0.4015901
##  [90,] 0.6014214 0.4015901
##  [91,] 0.6014214 0.4015901
##  [92,] 0.6014214 0.4015901
##  [93,] 0.6014214 0.4015901
##  [94,] 0.6014214 0.4015901
##  [95,] 0.6014214 0.4015901
##  [96,] 0.6014214 0.4015901
##  [97,] 0.6014214 0.4015901
##  [98,] 0.6014214 0.4015901
##  [99,] 0.6014214 0.4015901
## [100,] 0.6014214 0.4015901
## [101,] 0.6014214 0.4015901
## [102,] 0.6014214 0.4015901
## [103,] 0.6014214 0.4015901
## [104,] 0.6014214 0.4015901
## [105,] 0.6014214 0.4015901
## [106,] 0.6014214 0.4015901
## [107,] 0.6014214 0.4015901
## [108,] 0.6014214 0.4015901
## [109,] 0.6014214 0.4015901
## [110,] 0.6014214 0.4015901
## [111,] 0.6014214 0.4015901
## [112,] 0.6014214 0.4015901
## [113,] 0.6014214 0.4015901
## [114,] 0.6014214 0.4015901
## [115,] 0.6014214 0.4015901
## [116,] 0.6014214 0.4015901
## [117,] 0.6014214 0.4015901
## [118,] 0.6014214 0.4015901
## [119,] 0.6014214 0.4015901
## [120,] 0.6014214 0.4015901
## [121,] 0.6014214 0.4015901
## [122,] 0.6014214 0.4015901
## [123,] 0.6014214 0.4015901
## [124,] 0.6014214 0.4015901
## [125,] 0.6014214 0.4015901
## [126,] 0.6014214 0.4015901
## [127,] 0.6014214 0.4015901
## [128,] 0.6014214 0.4015901
## [129,] 0.6014214 0.4015901
## [130,] 0.6014214 0.4015901
## [131,] 0.6014214 0.4015901
## [132,] 0.6014214 0.4015901
## [133,] 0.6014214 0.4015901
## [134,] 0.6014214 0.4015901
## [135,] 0.6014214 0.4015901
## [136,] 0.6014214 0.4015901
## [137,] 0.6014214 0.4015901
## [138,] 0.6014214 0.4015901
## [139,] 0.6014214 0.4015901
## [140,] 0.6014214 0.4015901
## [141,] 0.6014214 0.4015901
## [142,] 0.6014214 0.4015901
## [143,] 0.6014214 0.4015901
## [144,] 0.6014214 0.4015901
## [145,] 0.6014214 0.4015901
## [146,] 0.6014214 0.4015901
## [147,] 0.6014214 0.4015901
## [148,] 0.6014214 0.4015901
## [149,] 0.6014214 0.4015901
## [150,] 0.6014214 0.4015901
## [151,] 0.6014214 0.4015901
## [152,] 0.6014214 0.4015901
## [153,] 0.6014214 0.4015901
## [154,] 0.6014214 0.4015901
## [155,] 0.6014214 0.4015901
## [156,] 0.6014214 0.4015901
## [157,] 0.6014214 0.4015901
## [158,] 0.6014214 0.4015901
## [159,] 0.6014214 0.4015901
## [160,] 0.6014214 0.4015901
## [161,] 0.6014214 0.4015901
## [162,] 0.6014214 0.4015901
## [163,] 0.6014214 0.4015901
## [164,] 0.6014214 0.4015901
## [165,] 0.6014214 0.4015901
## [166,] 0.6014214 0.4015901
## [167,] 0.6014214 0.4015901
## [168,] 0.6014214 0.4015901
## [169,] 0.6014214 0.4015901
## [170,] 0.6014214 0.4015901
## [171,] 0.6014214 0.4015901
## [172,] 0.6014214 0.4015901
## [173,] 0.6014214 0.4015901
## [174,] 0.6014214 0.4015901
## [175,] 0.6014214 0.4015901
## [176,] 0.6014214 0.4015901
## [177,] 0.6014214 0.4015901
## [178,] 0.6014214 0.4015901
## [179,] 0.6014214 0.4015901
## [180,] 0.6014214 0.4015901
## [181,] 0.6014214 0.4015901
## [182,] 0.6014214 0.4015901
## [183,] 0.6014214 0.4015901
## [184,] 0.6014214 0.4015901
## [185,] 0.6014214 0.4015901
## [186,] 0.6014214 0.4015901
## [187,] 0.6014214 0.4015901
## [188,] 0.6014214 0.4015901
## [189,] 0.6014214 0.4015901
## [190,] 0.6014214 0.4015901
## [191,] 0.6014214 0.4015901
## [192,] 0.6014214 0.4015901
## [193,] 0.6014214 0.4015901
## [194,] 0.6014214 0.4015901
## [195,] 0.6014214 0.4015901
## [196,] 0.6014214 0.4015901
## [197,] 0.6014214 0.4015901
## [198,] 0.6014214 0.4015901
## [199,] 0.6014214 0.4015901
## [200,] 0.6014214 0.4015901
## [201,] 0.6014214 0.4015901
## [202,] 0.6014214 0.4015901
## [203,] 0.6014214 0.4015901
## [204,] 0.6014214 0.4015901
## [205,] 0.6014214 0.4015901
## [206,] 0.6014214 0.4015901
## [207,] 0.6014214 0.4015901
## [208,] 0.6014214 0.4015901
## [209,] 0.6014214 0.4015901
## [210,] 0.6014214 0.4015901
## [211,] 0.6014214 0.4015901
## [212,] 0.6014214 0.4015901
## [213,] 0.6014214 0.4015901
## [214,] 0.6014214 0.4015901
## [215,] 0.6014214 0.4015901
## [216,] 0.6014214 0.4015901
## [217,] 0.6014214 0.4015901
## [218,] 0.6014214 0.4015901
## [219,] 0.6014214 0.4015901
## [220,] 0.6014214 0.4015901
## [221,] 0.6014214 0.4015901
## [222,] 0.6014214 0.4015901
## [223,] 0.6014214 0.4015901
## [224,] 0.6014214 0.4015901
## [225,] 0.6014214 0.4015901
## [226,] 0.6014214 0.4015901
## [227,] 0.6014214 0.4015901
## [228,] 0.6014214 0.4015901
## [229,] 0.6014214 0.4015901
## [230,] 0.6014214 0.4015901
## [231,] 0.6014214 0.4015901
## [232,] 0.6014214 0.4015901
## [233,] 0.6014214 0.4015901
## [234,] 0.6014214 0.4015901
## [235,] 0.6014214 0.4015901
## [236,] 0.6014214 0.4015901
## [237,] 0.6014214 0.4015901
## [238,] 0.6014214 0.4015901
## [239,] 0.6014214 0.4015901
## [240,] 0.6014214 0.4015901
## [241,] 0.6014214 0.4015901
## [242,] 0.6014214 0.4015901
## [243,] 0.6014214 0.4015901
## [244,] 0.6014214 0.4015901
## [245,] 0.6014214 0.4015901
## [246,] 0.6014214 0.4015901
## [247,] 0.6014214 0.4015901
## [248,] 0.6014214 0.4015901
## [249,] 0.6014214 0.4015901
## [250,] 0.6014214 0.4015901
## [251,] 0.6014214 0.4015901
## [252,] 0.6014214 0.4015901
## [253,] 0.6014214 0.4015901
## [254,] 0.6014214 0.4015901
## [255,] 0.6014214 0.4015901
## [256,] 0.6014214 0.4015901
## [257,] 0.6014214 0.4015901
## [258,] 0.6014214 0.4015901
## [259,] 0.6014214 0.4015901
## [260,] 0.6014214 0.4015901
## [261,] 0.6014214 0.4015901
## [262,] 0.6014214 0.4015901
## [263,] 0.6014214 0.4015901
## [264,] 0.6014214 0.4015901
## [265,] 0.6014214 0.4015901
## [266,] 0.6014214 0.4015901
## [267,] 0.6014214 0.4015901
## [268,] 0.6014214 0.4015901
## [269,] 0.6014214 0.4015901
## [270,] 0.6014214 0.4015901
## [271,] 0.6014214 0.4015901
## [272,] 0.6014214 0.4015901
## [273,] 0.6014214 0.4015901
## [274,] 0.6014214 0.4015901
## [275,] 0.6014214 0.4015901
## [276,] 0.6014214 0.4015901
## [277,] 0.6014214 0.4015901
## [278,] 0.6014214 0.4015901
## [279,] 0.6014214 0.4015901
## [280,] 0.6014214 0.4015901
## [281,] 0.6014214 0.4015901
## [282,] 0.6014214 0.4015901
## [283,] 0.6014214 0.4015901
## [284,] 0.6014214 0.4015901
## [285,] 0.6014214 0.4015901
## [286,] 0.6014214 0.4015901
## [287,] 0.6014214 0.4015901
## [288,] 0.6014214 0.4015901
## [289,] 0.6014214 0.4015901
## [290,] 0.6014214 0.4015901
## [291,] 0.6014214 0.4015901
## [292,] 0.6014214 0.4015901
## [293,] 0.6014214 0.4015901
## [294,] 0.6014214 0.4015901
## [295,] 0.6014214 0.4015901
## [296,] 0.6014214 0.4015901
## [297,] 0.6014214 0.4015901
## [298,] 0.6014214 0.4015901
## [299,] 0.6014214 0.4015901
## [300,] 0.6014214 0.4015901
## [301,] 0.6014214 0.4015901
## [302,] 0.6014214 0.4015901
## [303,] 0.6014214 0.4015901
## [304,] 0.6014214 0.4015901
## [305,] 0.6014214 0.4015901
## [306,] 0.6014214 0.4015901
## [307,] 0.6014214 0.4015901
## [308,] 0.6014214 0.4015901
## [309,] 0.6014214 0.4015901
## [310,] 0.6014214 0.4015901
## [311,] 0.6014214 0.4015901
## [312,] 0.6014214 0.4015901
## [313,] 0.6014214 0.4015901
## [314,] 0.6014214 0.4015901
## [315,] 0.6014214 0.4015901
## [316,] 0.6014214 0.4015901
## [317,] 0.6014214 0.4015901
## [318,] 0.6014214 0.4015901
## [319,] 0.6014214 0.4015901
## [320,] 0.6014214 0.4015901
## [321,] 0.6014214 0.4015901
## [322,] 0.6014214 0.4015901
## [323,] 0.6014214 0.4015901
## [324,] 0.6014214 0.4015901
## [325,] 0.6014214 0.4015901
## [326,] 0.6014214 0.4015901
## [327,] 0.6014214 0.4015901
## [328,] 0.6014214 0.4015901
## [329,] 0.6014214 0.4015901
## [330,] 0.6014214 0.4015901
## [331,] 0.6014214 0.4015901
## [332,] 0.6014214 0.4015901
## [333,] 0.6014214 0.4015901
## [334,] 0.6014214 0.4015901
## [335,] 0.6014214 0.4015901
## [336,] 0.6014214 0.4015901
## [337,] 0.6014214 0.4015901
## [338,] 0.6014214 0.4015901
## [339,] 0.6014214 0.4015901
## [340,] 0.6014214 0.4015901
## [341,] 0.6014214 0.4015901
## [342,] 0.6014214 0.4015901
## [343,] 0.6014214 0.4015901
## [344,] 0.6014214 0.4015901
## [345,] 0.6014214 0.4015901
## [346,] 0.6014214 0.4015901
## [347,] 0.6014214 0.4015901
## [348,] 0.6014214 0.4015901
## [349,] 0.6014214 0.4015901
## [350,] 0.6014214 0.4015901
## [351,] 0.6014214 0.4015901
## [352,] 0.6014214 0.4015901
## [353,] 0.6014214 0.4015901
## [354,] 0.6014214 0.4015901
## [355,] 0.6014214 0.4015901
## [356,] 0.6014214 0.4015901
## [357,] 0.6014214 0.4015901
## [358,] 0.6014214 0.4015901
## [359,] 0.6014214 0.4015901
## [360,] 0.6014214 0.4015901
## [361,] 0.6014214 0.4015901
## [362,] 0.6014214 0.4015901
## [363,] 0.6014214 0.4015901
## [364,] 0.6014214 0.4015901
## [365,] 0.6014214 0.4015901
## [366,] 0.6014214 0.4015901
## [367,] 0.6014214 0.4015901
## [368,] 0.6014214 0.4015901
## [369,] 0.6014214 0.4015901
## [370,] 0.6014214 0.4015901
## [371,] 0.6014214 0.4015901
## [372,] 0.6014214 0.4015901
## [373,] 0.6014214 0.4015901
## [374,] 0.6014214 0.4015901
## [375,] 0.6014214 0.4015901
## [376,] 0.6014214 0.4015901
## [377,] 0.6014214 0.4015901
## [378,] 0.6014214 0.4015901
## [379,] 0.6014214 0.4015901
## [380,] 0.6014214 0.4015901
## [381,] 0.6014214 0.4015901
## [382,] 0.6014214 0.4015901
## [383,] 0.6014214 0.4015901
## [384,] 0.6014214 0.4015901
## [385,] 0.6014214 0.4015901
## [386,] 0.6014214 0.4015901
## [387,] 0.6014214 0.4015901
## [388,] 0.6014214 0.4015901
## [389,] 0.6014214 0.4015901
## [390,] 0.6014214 0.4015901
## [391,] 0.6014214 0.4015901
## [392,] 0.6014214 0.4015901
## [393,] 0.6014214 0.4015901
## [394,] 0.6014214 0.4015901
## [395,] 0.6014214 0.4015901
## [396,] 0.6014214 0.4015901
## [397,] 0.6014214 0.4015901
## [398,] 0.6014214 0.4015901
## [399,] 0.6014214 0.4015901
## [400,] 0.6014214 0.4015901
## [401,] 0.6014214 0.4015901
## [402,] 0.6014214 0.4015901
## [403,] 0.6014214 0.4015901
## [404,] 0.6014214 0.4015901
## [405,] 0.6014214 0.4015901
## [406,] 0.6014214 0.4015901
## [407,] 0.6014214 0.4015901
## [408,] 0.6014214 0.4015901
## [409,] 0.6014214 0.4015901
## [410,] 0.6014214 0.4015901
## [411,] 0.6014214 0.4015901
## [412,] 0.6014214 0.4015901
## [413,] 0.6014214 0.4015901
## [414,] 0.6014214 0.4015901
## [415,] 0.6014214 0.4015901
## [416,] 0.6014214 0.4015901
## [417,] 0.6014214 0.4015901
## [418,] 0.6014214 0.4015901
## [419,] 0.6014214 0.4015901
## [420,] 0.6014214 0.4015901
## [421,] 0.6014214 0.4015901
## [422,] 0.6014214 0.4015901
## [423,] 0.6014214 0.4015901
## [424,] 0.6014214 0.4015901
## [425,] 0.6014214 0.4015901
## [426,] 0.6014214 0.4015901
## [427,] 0.6014214 0.4015901
## [428,] 0.6014214 0.4015901
## [429,] 0.6014214 0.4015901
## [430,] 0.6014214 0.4015901
## [431,] 0.6014214 0.4015901
## [432,] 0.6014214 0.4015901
## [433,] 0.6014214 0.4015901
## [434,] 0.6014214 0.4015901
## [435,] 0.6014214 0.4015901
## [436,] 0.6014214 0.4015901
## [437,] 0.6014214 0.4015901
## [438,] 0.6014214 0.4015901
## [439,] 0.6014214 0.4015901
## [440,] 0.6014214 0.4015901
## [441,] 0.6014214 0.4015901
## [442,] 0.6014214 0.4015901
## [443,] 0.6014214 0.4015901
## [444,] 0.6014214 0.4015901
## [445,] 0.6014214 0.4015901
## [446,] 0.6014214 0.4015901
## [447,] 0.6014214 0.4015901
## [448,] 0.6014214 0.4015901
## [449,] 0.6014214 0.4015901
## [450,] 0.6014214 0.4015901
## [451,] 0.6014214 0.4015901
## [452,] 0.6014214 0.4015901
## [453,] 0.6014214 0.4015901
## [454,] 0.6014214 0.4015901
## [455,] 0.6014214 0.4015901
## [456,] 0.6014214 0.4015901
## [457,] 0.6014214 0.4015901
## [458,] 0.6014214 0.4015901
## [459,] 0.6014214 0.4015901
## [460,] 0.6014214 0.4015901
## [461,] 0.6014214 0.4015901
## [462,] 0.6014214 0.4015901
## [463,] 0.6014214 0.4015901
## [464,] 0.6014214 0.4015901
## [465,] 0.6014214 0.4015901
## [466,] 0.6014214 0.4015901
## [467,] 0.6014214 0.4015901
## [468,] 0.6014214 0.4015901
## [469,] 0.6014214 0.4015901
## [470,] 0.6014214 0.4015901
## [471,] 0.6014214 0.4015901
## [472,] 0.6014214 0.4015901
## [473,] 0.6014214 0.4015901
## [474,] 0.6014214 0.4015901
## [475,] 0.6014214 0.4015901
## [476,] 0.6014214 0.4015901
## [477,] 0.6014214 0.4015901
## [478,] 0.6014214 0.4015901
## [479,] 0.6014214 0.4015901
## [480,] 0.6014214 0.4015901
## [481,] 0.6014214 0.4015901
## [482,] 0.6014214 0.4015901
## [483,] 0.6014214 0.4015901
## [484,] 0.6014214 0.4015901
## [485,] 0.6014214 0.4015901
## [486,] 0.6014214 0.4015901
## [487,] 0.6014214 0.4015901
## [488,] 0.6014214 0.4015901
## [489,] 0.6014214 0.4015901
## [490,] 0.6014214 0.4015901
## [491,] 0.6014214 0.4015901
## [492,] 0.6014214 0.4015901
## [493,] 0.6014214 0.4015901
## [494,] 0.6014214 0.4015901
## [495,] 0.6014214 0.4015901
## [496,] 0.6014214 0.4015901
## [497,] 0.6014214 0.4015901
## [498,] 0.6014214 0.4015901
## [499,] 0.6014214 0.4015901
## [500,] 0.6014214 0.4015901
## [501,] 0.6014214 0.4015901
## [502,] 0.6014214 0.4015901
## [503,] 0.6014214 0.4015901
## [504,] 0.6014214 0.4015901
## [505,] 0.6014214 0.4015901
## [506,] 0.6014214 0.4015901
## [507,] 0.6014214 0.4015901
## [508,] 0.6014214 0.4015901
## [509,] 0.6014214 0.4015901
## [510,] 0.6014214 0.4015901
## [511,] 0.6014214 0.4015901
## [512,] 0.6014214 0.4015901
## [513,] 0.6014214 0.4015901
## [514,] 0.6014214 0.4015901
## [515,] 0.6014214 0.4015901
## [516,] 0.6014214 0.4015901
## [517,] 0.6014214 0.4015901
## [518,] 0.6014214 0.4015901
## [519,] 0.6014214 0.4015901
## [520,] 0.6014214 0.4015901
## [521,] 0.6014214 0.4015901
## [522,] 0.6014214 0.4015901
## [523,] 0.6014214 0.4015901
## [524,] 0.6014214 0.4015901
## [525,] 0.6014214 0.4015901
## [526,] 0.6014214 0.4015901
## [527,] 0.6014214 0.4015901
## [528,] 0.6014214 0.4015901
## [529,] 0.6014214 0.4015901
## [530,] 0.6014214 0.4015901
## [531,] 0.6014214 0.4015901
## [532,] 0.6014214 0.4015901
## [533,] 0.6014214 0.4015901
## [534,] 0.6014214 0.4015901
## [535,] 0.6014214 0.4015901
## [536,] 0.6014214 0.4015901
## [537,] 0.6014214 0.4015901
## [538,] 0.6014214 0.4015901
## [539,] 0.6014214 0.4015901
## [540,] 0.6014214 0.4015901
## [541,] 0.6014214 0.4015901
## [542,] 0.6014214 0.4015901
## [543,] 0.6014214 0.4015901
## [544,] 0.6014214 0.4015901
## [545,] 0.6014214 0.4015901
## [546,] 0.6014214 0.4015901
## [547,] 0.6014214 0.4015901
## [548,] 0.6014214 0.4015901
## [549,] 0.6014214 0.4015901
## [550,] 0.6014214 0.4015901
## [551,] 0.6014214 0.4015901
## [552,] 0.6014214 0.4015901
## [553,] 0.6014214 0.4015901
## [554,] 0.6014214 0.4015901
## [555,] 0.6014214 0.4015901
## [556,] 0.6014214 0.4015901
## [557,] 0.6014214 0.4015901
## [558,] 0.6014214 0.4015901
## [559,] 0.6014214 0.4015901
## [560,] 0.6014214 0.4015901
## [561,] 0.6014214 0.4015901
## [562,] 0.6014214 0.4015901
## [563,] 0.6014214 0.4015901
## [564,] 0.6014214 0.4015901
## [565,] 0.6014214 0.4015901
## [566,] 0.6014214 0.4015901
## [567,] 0.6014214 0.4015901
## [568,] 0.6014214 0.4015901
## [569,] 0.6014214 0.4015901
probabilidad2 <- prediccion2$net.result
resultado2 <- ifelse(probabilidad2>0.5, 1,0)
resultado
##      [,1]
## [1,]    0
## [2,]    0
## [3,]    0
LS0tCnRpdGxlOiAiUmVkZXMgTmV1cm9uYWxlcyIKYXV0aG9yOiAiRGF2aWQgSGVyZWRpYSBTw6FuY2hleiIKZGF0ZTogIjIwMjQtMDItMjIiCm91dHB1dDogCiBodG1sX2RvY3VtZW50OgogICAgdG9jOiBUUlVFCiAgICB0b2NfZmxvYXQ6IFRSVUUKICAgIGNvZGVfZG93bmxvYWQ6IFRSVUUgCiAgICB0aGVtZTogInNwYWNlbGFiIgogICAgaGlnaGxpZ2h0OiAia2F0ZSIKLS0tCgohW10oL1VzZXJzL2RhdmlkMy9EZXNrdG9wL2ZpZ3VyYS0uanBnKQoKIyA8c3BhbiBzdHlsZT0iY29sb3I6IGJsdWU7IiA+IFRlb3LDrWE8L3NwYW4+CgpVbmEgUmVkIE5ldXJvbmFsIEFydGlmaWNpYWwgKEFOTikgbW9kZWxhIGxhIHJlbGFjacOzbiBlbnRyZSB1biBjb25qdW50byBkZSAKZW50cmFkYXMgeSB1bmEgc2FsaWRhLCByZXNvbHZpZW5kbyB1biBwcm9ibGVtYSBkZSBhcHJlbmRpemFqZS4gCgpBbGd1bm9zIGVqZW1wbG9zIGRlIGFwbGljYWNpw7NuIGRlIEFOTiBzb246CgoqIExhIHJlY29tZW5kYWNpw7NuIGRlIGNvbnRlbmlkbyBkZSBOZXRmbGl4LiAgCiogRWwgZmVlZCBkZSBJbnN0YWdyYW0uICAKKiBEZXRlcm1pbmFyIGVsIG7Dum1lcm8gZXNjcml0byBhIG1hbm8uICAKCiMgPHNwYW4gc3R5bGU9ImNvbG9yOiBibHVlOyIgPiBFamVyY2ljaW8gMS4gwr9QYXPDqSBsYSBtYXRlcmlhPyA8L3NwYW4+CgojIyA8c3BhbiBzdHlsZT0iY29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