Skip to content

Commit

Permalink
Merge pull request #1 from data-datum/master
Browse files Browse the repository at this point in the history
Presentacion Into y clasificacion
  • Loading branch information
PatriLoto authored Sep 23, 2020
2 parents 6da8b25 + 8464ee1 commit 32c9b89
Show file tree
Hide file tree
Showing 581 changed files with 50,079 additions and 9,330 deletions.
File renamed without changes.
195 changes: 195 additions & 0 deletions intro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<title>Presentation Ninja</title>
<meta charset="utf-8" />
<meta name="author" content="Yihui Xie" />
<meta name="author" content="Garrick Aden-Buie" />
<meta name="date" content="2020-09-21" />
<script src="libs/xaringanExtra-logo/logo.js"></script>
<link rel="stylesheet" href="xaringan-themer.css" type="text/css" />
</head>
<body>
<textarea id="source">
class: center, middle, inverse, title-slide

# Presentation Ninja
## ⚔️ xaringan +<br/>😎 xaringanthemer
### Yihui Xie
### Garrick Aden-Buie
### 2020-09-21

---








<style type="text/css">
.xaringan-extra-logo {
width: 110px;
height: 128px;
z-index: 0;
background-image: url('');
background-size: contain;
background-repeat: no-repeat;
position: absolute;
top:1em;right:1em;
}
</style>


---


# ¿Qué es el aprendizaje automático?



---

# Aprendizaje automático e IA



---

# El aprendizaje automático y otros campos relacionados

---

# IA y Ética


---

# El aprendizaje automático y ciencia de datos


---
</textarea>
<style data-target="print-only">@media screen {.remark-slide-container{display:block;}.remark-slide-scaler{box-shadow:none;}}</style>
<script src="https://remarkjs.com/downloads/remark-latest.min.js"></script>
<script>var slideshow = remark.create({
"highlightStyle": "github",
"highlightLines": true,
"countIncrementalSlides": false
});
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {
window.dispatchEvent(new Event('resize'));
});
(function(d) {
var s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler");
if (!r) return;
s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }";
d.head.appendChild(s);
})(document);

(function(d) {
var el = d.getElementsByClassName("remark-slides-area");
if (!el) return;
var slide, slides = slideshow.getSlides(), els = el[0].children;
for (var i = 1; i < slides.length; i++) {
slide = slides[i];
if (slide.properties.continued === "true" || slide.properties.count === "false") {
els[i - 1].className += ' has-continuation';
}
}
var s = d.createElement("style");
s.type = "text/css"; s.innerHTML = "@media print { .has-continuation { display: none; } }";
d.head.appendChild(s);
})(document);
// delete the temporary CSS (for displaying all slides initially) when the user
// starts to view slides
(function() {
var deleted = false;
slideshow.on('beforeShowSlide', function(slide) {
if (deleted) return;
var sheets = document.styleSheets, node;
for (var i = 0; i < sheets.length; i++) {
node = sheets[i].ownerNode;
if (node.dataset["target"] !== "print-only") continue;
node.parentNode.removeChild(node);
}
deleted = true;
});
})();
(function() {
"use strict"
// Replace <script> tags in slides area to make them executable
var scripts = document.querySelectorAll(
'.remark-slides-area .remark-slide-container script'
);
if (!scripts.length) return;
for (var i = 0; i < scripts.length; i++) {
var s = document.createElement('script');
var code = document.createTextNode(scripts[i].textContent);
s.appendChild(code);
var scriptAttrs = scripts[i].attributes;
for (var j = 0; j < scriptAttrs.length; j++) {
s.setAttribute(scriptAttrs[j].name, scriptAttrs[j].value);
}
scripts[i].parentElement.replaceChild(s, scripts[i]);
}
})();
(function() {
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
if (/^(https?:)?\/\//.test(links[i].getAttribute('href'))) {
links[i].target = '_blank';
}
}
})();
// adds .remark-code-has-line-highlighted class to <pre> parent elements
// of code chunks containing highlighted lines with class .remark-code-line-highlighted
(function(d) {
const hlines = d.querySelectorAll('.remark-code-line-highlighted');
const preParents = [];
const findPreParent = function(line, p = 0) {
if (p > 1) return null; // traverse up no further than grandparent
const el = line.parentElement;
return el.tagName === "PRE" ? el : findPreParent(el, ++p);
};

for (let line of hlines) {
let pre = findPreParent(line);
if (pre && !preParents.includes(pre)) preParents.push(pre);
}
preParents.forEach(p => p.classList.add("remark-code-has-line-highlighted"));
})(document);</script>

<script>
slideshow._releaseMath = function(el) {
var i, text, code, codes = el.getElementsByTagName('code');
for (i = 0; i < codes.length;) {
code = codes[i];
if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
text = code.textContent;
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
/^\$\$(.|\s)+\$\$$/.test(text) ||
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
code.outerHTML = code.innerHTML; // remove <code></code>
continue;
}
}
i++;
}
};
slideshow._releaseMath(document);
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML';
if (location.protocol !== 'file:' && /^https?:/.test(script.src))
script.src = script.src.replace(/^https?:/, '');
document.getElementsByTagName('head')[0].appendChild(script);
})();
</script>
</body>
</html>
14 changes: 14 additions & 0 deletions libs/xaringanExtra-logo/logo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

(function() {
let tries = 0
function addLogo() {
if (typeof slideshow === 'undefined') {
++tries < 10 ? setTimeout(addLogo, 100) : null
return
} else {
document.querySelectorAll('.remark-slide-content:not(.title-slide):not(.inverse):not(.hide_logo)')
.forEach(el => el.innerHTML += '<div class="xaringan-extra-logo"></div>')
}
}
document.addEventListener('DOMContentLoaded', addLogo)
})()
9 changes: 6 additions & 3 deletions material/anexo/reg-logistica-RF.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ library(palmerpenguins)
penguins_df<-penguins %>%
filter(!is.na(sex))%>%
select(-year, -island)

library(tidymodels)
library(ranger)
set.seed(123)
library(rsamples)
penguin_split<-initial_split(penguins_df, strata=sex)
penguin_train<-training(penguin_split)
penguin_test<-testing(penguin_split)
Expand Down Expand Up @@ -54,7 +55,8 @@ rf_fit<-penguin_workf%>%
)

rf_fit
rf_fit$metrics
rf_fit$.metrics
rf_fit$.predictions
#roc curve y accuracy
rf_fit %>%
collect_metrics()
Expand All @@ -73,7 +75,7 @@ glm_fit %>%
roc_curve(sex, .pred_female) %>%
ggplot(aes(1 - specificity, sensitivity, color = id)) +
geom_abline(lty = 2, color = "gray80", size = 1.5) +
geom_path(show.legend = FALSE, alpha = 0.6, size = 1.2) +
geom_path(show.legend = TRUE, alpha = 0.6, size = 1.2) +
coord_equal()

#random forest CURVA ROC
Expand All @@ -97,6 +99,7 @@ collect_metrics(penguin_final)
collect_predictions(penguin_final) %>%
conf_mat(sex, .pred_class)

# PARA HACER
install.packages("vip")
library(vip)

Expand Down
Loading

0 comments on commit 32c9b89

Please sign in to comment.