View example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
data = np.array([ | |
[-2.0, -1], # Alice | |
[25, 6], # Bob | |
[17, 4], # Charlie | |
[-15, -6], # Diana | |
]) | |
all_y_trues = np.array([ |
View gist:20bfb7abf6bcf8f15360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All | |
Abnormality of body height | |
Multicystic kidney dysplasia | |
Mode of inheritance | |
Autosomal dominant inheritance | |
Autosomal recessive inheritance | |
Abnormality of female internal genitalia | |
Functional abnormality of the bladder | |
Recurrent urinary tract infections | |
Neurogenic bladder |
View gist:4282933
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Examples for R training | |
# Author: Gang Chen <chengang@genomics.cn> | |
# Nov 2012 | |
# Lesson 2 | |
# vector | |
a <- c(1, 2, 5, 3, 6, -2, 4) | |
b <- c("one", "two", "three") | |
c <- c(TRUE, TRUE, TRUE, FALSE, TRUE, FALSE) |
View svm-rfe.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svmrfeFeatureRanking = function(x,y){ | |
n = ncol(x) | |
survivingFeaturesIndexes = seq(1:n) | |
featureRankedList = vector(length=n) | |
rankedFeatureIndex = n | |
while(length(survivingFeaturesIndexes)>0){ | |
#train the support vector machine | |
svmModel = svm(x[, survivingFeaturesIndexes], y, cost = 10, cachesize=500,scale=F, type="C-classification", kernel="linear" ) |