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
%% Balanced Classes, easily seperable | |
data = [randn(2500, 1) ; 1 + randn(2500, 1)]; | |
labels = [zeros(2500, 1) ; ones(2500, 1)]; | |
y_pred = classify(data, data, labels); | |
TP1 = sum(y_pred == 1 & labels == 1); | |
temp = ClassificationDiscriminant.fit(data, labels); | |
y_pred2 = temp.predict(data); | |
TP2 = sum(y_pred2 == 1 & labels == 1); |
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
N1 = 3500; N2 = 1500; | |
data = [randn(N1, 1) ; 1 + randn(N2, 1)]; | |
labels = [zeros(N1, 1) ; ones(N2, 1)]; | |
for ii = 1:200 | |
cv(ii) = cvpartition(labels, 'Holdout', 0.2); | |
end | |
b_pcc = zeros(1, cv.NumTestSets); | |
for ii = 1:length(cv) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[[{"x":154,"y":83},{"x":156,"y":84},{"x":157,"y":84},{"x":159,"y":84},{"x":163,"y":88},{"x":172,"y":93},{"x":179,"y":98},{"x":184,"y":101},{"x":193,"y":109},{"x":199,"y":114},{"x":202,"y":118},{"x":204,"y":122},{"x":205,"y":132},{"x":207,"y":147},{"x":210,"y":166},{"x":213,"y":182},{"x":219,"y":198},{"x":232,"y":214},{"x":245,"y":233},{"x":256,"y":245},{"x":265,"y":251},{"x":269,"y":254}],[{"x":328,"y":176},{"x":330,"y":176},{"x":334,"y":180},{"x":340,"y":187},{"x":351,"y":195},{"x":359,"y":207},{"x":363,"y":211},{"x":366,"y":213},{"x":368,"y":218},{"x":371,"y":229},{"x":376,"y":247},{"x":381,"y":259},{"x":387,"y":268},{"x":393,"y":274},{"x":402,"y":280},{"x":410,"y":284},{"x":419,"y":288},{"x":425,"y":291},{"x":433,"y":293}]] |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
</style> | |
<body> | |
</body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
var w = 500, | |
h = 500, |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.overlay { | |
fill-opacity: 0.1; | |
} | |
circle { | |
fill: black; | |
} | |
</style> |
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
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from selenium import webdriver | |
# driver = webdriver.Firefox() | |
driver = webdriver.PhantomJS() | |
driver.set_window_size(1120, 550) | |
driver.get("https://duckduckgo.com/") | |
driver.find_element_by_id('search_form_input_homepage').send_keys("google slavery") | |
driver.find_element_by_id("search_button_homepage").click() | |
out = driver.find_elements_by_xpath("//div[@id='links']/div") | |
# out |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<p> | |
<textarea class="js-copytextarea">Hello I'm some text</textarea> |
OlderNewer