Skip to content

Instantly share code, notes, and snippets.

@berkorbay
Last active November 8, 2016 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berkorbay/6df145c579806799122c492465c2ffde to your computer and use it in GitHub Desktop.
Save berkorbay/6df145c579806799122c492465c2ffde to your computer and use it in GitHub Desktop.
These gists are specially created to initialize uslfin users.
#Part of the learnfin package tutorial.
#First set of experiments with (almost) default values.
####REQUIRED - CHANGE BELOW
setwd("Set this value to the path of the input parameters excel file.")
##Example MacOS, Linux setwd("~/Documents/learnfin_implementation/")
##Example Windows setwd("C:/Documents/learnfin_implementation/")
#The code below will do a series of experiments and return the summary results of those experiments.
#Experiment parameters are taken from the input_parameters.xlsx file.
run_full_experiment(
data_set="learnfin_ds_1",
error_type="ARPE",
method="kmeans",
path_name=getwd(),
file_name="input_parameters.xlsx",
randseed=3456,
verbal_feedback=TRUE,
export_raw_results=FALSE,
export_folder="results",
summary_to_excel=FALSE
)
#Here are the steps to install learnfin R package from GitHub
#See https://learnfin.github.io for detailed information
#First, some optional but nice to have options
options(repos="http://cran.rstudio.com/") #Set default repo to CRAN
options(dplyr.width = Inf) #See all dplyr data table columns
options(scipen = 7) #Set number of digits displayed to 7
#Install devtools package for the ability to install from GitHub
#You may skip this command if you have already installed devtools
install.packages("devtools")
#Install learnfin package from its GitHub repository
devtools::install_github("learnfin/learnfin")
#Load the package
library(learnfin)
#That's it! Congratulations, you have just downloaded and installed an academic work.
#Other pages and gists will help you run the codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment