This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
neuroimagen:bioface_atn [2021/09/09 09:16] osotolongo [What we got so far] |
neuroimagen:bioface_atn [2021/09/12 10:23] osotolongo [Métodos no lineales] |
||
---|---|---|---|
Line 183: | Line 183: | ||
library(" | library(" | ||
pop <- adnimerge[adnimerge$VISCODE==" | pop <- adnimerge[adnimerge$VISCODE==" | ||
- | pop$ND = ifelse(pop$DX == " | + | pop$ND = as.factor(ifelse(pop$DX == " |
xt <- pop[, c(" | xt <- pop[, c(" | ||
</ | </ | ||
Line 206: | Line 206: | ||
< | < | ||
+ | setwd("/ | ||
base <- read.csv(" | base <- read.csv(" | ||
base$Hippocampus = base$Left.Hippocampus + base$Right.Hippocampus | base$Hippocampus = base$Left.Hippocampus + base$Right.Hippocampus | ||
Line 223: | Line 224: | ||
< | < | ||
- | base$post <- predict(classifier_cl, | + | base$post <- predict(classifier_cl, |
</ | </ | ||
+ | ^ Clasificación ^ Probabilidades de N+ ^ | ||
+ | | {{ : | ||
+ | Y esto voy a hacerlo para FACEHBI también para compararlo, | ||
+ | < | ||
+ | setwd("/ | ||
+ | read.csv(" | ||
+ | face$Hippocampus = face$Left.Hippocampus + face$Right.Hippocampus | ||
+ | face$Entorhinal = face$lh.entorhinal.GrayVol + face$rh.entorhinal.GrayVol | ||
+ | face$Ventricles <- face$Left.Inf.Lat.Vent + face$Right.Inf.Lat.Vent + face$Left.Lateral.Ventricle + face$Right.Lateral.Ventricle | ||
+ | face$MidTemp = face$lh.middletemporal.GrayVol + face$rh.middletemporal.GrayVol | ||
+ | face$ICV = face$eTIV | ||
+ | face$ND <- predict(classifier_cl, | ||
+ | face$post <- predict(classifier_cl, | ||
+ | </ | ||
+ | |||
+ | ^ Clasificación ^ Probabilidades de N+ ^ | ||
+ | | {{ : | ||
+ | |||
+ | ==== Métodos no lineales ==== | ||
+ | |||
+ | Vamos a intentar con métodos no lineales. Ojo, estos métodos no tienen interpretación probabilistica. Son construcciones matemáticas que funcionan. | ||
+ | |||
+ | === random Forest === | ||
+ | |||
+ | ** BIOFACE ** | ||
+ | < | ||
+ | rf_cl <- randomForest(ND ~ ., data = xt, na.action = na.omit) | ||
+ | base$ND <- predict(rf_cl, | ||
+ | base$post <- predict(rf_cl, | ||
+ | plot(base$AGE, | ||
+ | hist(base$post[, | ||
+ | </ | ||
+ | |||
+ | ^ Clasificación ^ Probabilidades de N+ ^ | ||
+ | | {{ : | ||
+ | |||
+ | **FACEHBI** | ||
+ | |||
+ | < | ||
+ | face$ND <- predict(rf_cl, | ||
+ | face$post <- predict(rf_cl, | ||
+ | plot(face$AGE, | ||
+ | hist(face$post[, | ||
+ | </ | ||
+ | |||
+ | ^ Clasificación ^ Probabilidades de N+ ^ | ||
+ | | {{ : | ||
+ | |||
+ | === support-vector machine === | ||
+ | |||
+ | **BIOFACE** | ||
+ | |||
+ | < | ||
+ | svm_cl <- svm(ND ~ ., data = xt, na.action = na.omit) | ||
+ | base$ND <- predict(svm_cl, | ||
+ | plot(base$AGE, | ||
+ | </ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ** FACEHBI ** | ||
+ | |||
+ | < | ||
+ | face$ND <- predict(svm_cl, | ||
+ | plot(face$AGE, | ||
+ | </ | ||
+ | |||
+ | {{ : |