This file contains hidden or 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
library("Rcpp") | |
library("devtools") | |
install_github("mjoc/antfarm") | |
library("antfarm") | |
library("dplyr") | |
library("caret") | |
doLoadFromBinary <- TRUE | |
if (doLoadFromBinary) { | |
# Load the MNIST digit recognition dataset into R |
This file contains hidden or 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
g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/opt/local/include -I/usr/local/include -I"/home/moconnor01/R/x86_64-redhat-linux-gnu-library/3.2/Rcpp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o | |
g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/opt/local/include -I/usr/local/include -I"/home/moconnor01/R/x86_64-redhat-linux-gnu-library/3.2/Rcpp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c backprop.cpp -o backprop.o | |
backprop.cpp: In constructor âBackpropper::Backpropper(Nnet&)â: | |
backprop.cpp:40: warning: comparison between signed and unsigned integer expressions | |
backprop.cpp: In constructor âBackpropper::Backpropper(Nnet&, std::string)â: | |
backprop.cpp:71: warning: comparison between signed and unsigned integer expressions | |
backprop.cpp: In member function âvoid Backpropper::initial |
This file contains hidden or 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
library("Rcpp") | |
library("devtools") | |
install_github("mjoc/antfarm") | |
library("antfarm") | |
library("dplyr") | |
library("reshape2") | |
library("hexbin") | |
af_net_module <- Module("af_nnet",PACKAGE = 'antfarm') | |
af_dataset_image <- af_net_module$Dataset |
This file contains hidden or 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
library(ggplot2) | |
library(shiny) | |
# Call ggbrush with a ggplot2 object, and the dimensions which | |
# should be brushed (try "xy" for scatter, "x" for histogram). | |
# The plot will show in RStudio Viewer or your web browser, and | |
# any observations selected by the user will be returned. | |
ggbrush <- function(plotExpr, direction = c("xy", "x", "y")) { | |
# See below for definition of dialogPage function |
This file contains hidden or 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
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |