ttvand / Santander-Product-Recommendation

2nd Place Solution of the Kaggle Competition - Santander Product Recommendation
173 stars 114 forks source link

Failed to parse date at rawToRds.R #1

Open lancifollia opened 7 years ago

lancifollia commented 7 years ago

@ttvand Thank you for sharing your code. This code in rawToRds.R looks strange. Was it intended?

...
test$fecha_dato <- as.Date(test$fecha_dato, format="%m/%d/%Y")
...
test$fecha_alta <- as.Date(test$fecha_alta, format="%m/%d/%Y")
...
test$ult_fec_cli_1t <- as.Date(test$ult_fec_cli_1t, format="%m/%d/%Y")

The format="%m/%d/%Y" does not match the format of the test data.

Here is a sample rows of test data:

"fecha_dato","ncodpers","ind_empleado","pais_residencia","sexo","age","fecha_alta","ind_nuevo","antiguedad","indrel","ult_fec_cli_1t","indrel_1mes","tiprel_1mes","indresi","indext","conyuemp","canal_entrada","indfall","tipodom","cod_prov","nomprov","ind_actividad_cliente","renta","segmento"
2016-06-28,  15889,F,ES,V, 56,1995-01-16,0,    256, 1,,1,A,S,N,N,KAT,N,1,28,"MADRID",1,  326124.90,01 - TOP
2016-06-28,1170544,N,ES,H, 36,2013-08-28,0,     34, 1,,1,I,S,N,,KAT,N,1, 3,"ALICANTE",0,         NA,02 - PARTICULARES
ttvand commented 7 years ago

Hi @lancifollia, thanks for the comment!

I think there were two versions of the data, they modified the test format throughout the competition so people who downloaded the later version can simply use the train format.

lancifollia commented 7 years ago

@ttvand Okay. Thanks!