Skip to content

Instantly share code, notes, and snippets.

Daniel Trujillo Viedma gDanix

Block or report user

Report or block gDanix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gDanix
gDanix / Graphical_RF.r
Created Dec 14, 2016
Código en R problemático con la definición de 'train'
View Graphical_RF.r
library (randomForest)
acierto <- function(bag.datos){
return (sum (sapply(1:length(bag.datos$y), function(x){
if (is.na(bag.datos$predicted[x])){
0
}
else if (as.numeric(bag.datos$y[x])==as.numeric(bag.datos$predicted[x])){
1
@gDanix
gDanix / grafica_temperaturas.R
Created Nov 8, 2016
Código en R que genera una gráfica con el dataset NY.xls
View grafica_temperaturas.R
lowest_y = min(min(ny$`Warmest Minimum Temperature (C)`), min(ny$`Coldest Minimum Temperature (C)`))
highest_y = max(max(ny$`Warmest Minimum Temperature (C)`), max(ny$`Coldest Minimum Temperature (C)`))
plot(ny$Year, ny$`Warmest Minimum Temperature (C)`, xlim = c(min(ny$Year), 2015), xlab = "Año", ylab = "Temperatura (ºC)", main = "Temperaturas mínimas más cálidas y frías", xaxt = "n", type = "l", ylim = c(lowest_y, highest_y), col="orange")
lines(ny$Year, ny$`Coldest Minimum Temperature (C)`, xlim = c(min(ny$Year), 2015), type = "l", ylim = c(lowest_y, highest_y), col="cadetblue3")
axis(1, at=seq(1900,2015, 5), cex.axis = 0.5)
abline(h=seq(-10,15,2.5), lty=2)
legend("topleft", legend="Más cálida", col="orange", lty=1, cex=0.6)
legend("bottomleft", legend="Más fría", col="cadetblue3", lty=1, cex=0.6)
You can’t perform that action at this time.