#> default student balance income
#> 1 No No 729.5265 44361.625
#> 2 No Yes 817.1804 12106.135
#> 3 No No 1073.5492 31767.139
#> 4 No No 529.2506 35704.494
#> 5 No No 785.6559 38463.496
#> 6 No Yes 919.5885 7491.559
#> inadimplente estudante balanco receita
#> Nao:9667 Min. :0.0000 Min. : 0.0 Min. : 772
#> Sim: 333 1st Qu.:0.0000 1st Qu.: 481.7 1st Qu.:21340
#> Median :0.0000 Median : 823.6 Median :34553
#> Mean :0.2944 Mean : 835.4 Mean :33517
#> 3rd Qu.:1.0000 3rd Qu.:1166.3 3rd Qu.:43808
#> Max. :1.0000 Max. :2654.3 Max. :73554
Treino e Teste
library(caret)set.seed(2024)y<-credito$inadimplenteindice_teste<-createDataPartition(y, times =1, p =0.2, list =FALSE)conj_treino<-credito[-indice_teste,]conj_teste<-credito[indice_teste,]summary(conj_treino)
#> inadimplente estudante balanco receita
#> Nao:7733 Min. :0.0000 Min. : 0.0 Min. : 772
#> Sim: 266 1st Qu.:0.0000 1st Qu.: 481.8 1st Qu.:21536
#> Median :0.0000 Median : 818.0 Median :34690
#> Mean :0.2929 Mean : 833.4 Mean :33610
#> 3rd Qu.:1.0000 3rd Qu.:1164.6 3rd Qu.:43850
#> Max. :1.0000 Max. :2654.3 Max. :73554