https://www.kaggle.com/c/amazon-employee-access-challenge 3rd place, team Dmitry&Leustagos, members: Lucas Silva, Dmitry EfimovOut solution for Amazon.com - Employee Access Challenge
Copyright  [Dmitry Efimov, Lucas Silva] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
How to use it
The hardware / OS platform you used Windows 7 Professional x64 or Ubuntu (tested on 12.04)
Any necessary 3rd-party software (+ installation steps)
R 2.15.3 (http://www.r-project.org/) Packages: data.table, gbm, randomForest, glmnet, parallel, doSNOW, foreach, Metrics, cvTools, lme4, rlecuyer
Python 2.6 (http://www.python.org/download/releases/2.6/) Packages: numpy, sklearn, scipy, itertools, pandas, sys, random, time
How to train models and make predictions on a new test set
The file list with description
Files for models training: train.gbm.freq.hom2.R train.gbm.freq.hom3.R train.gbm.lme.R train.gbm.occurs.R train.glmnet.R train.glmnet2.R train.libfm.R train.lr.R train.lr2.R train.rf.freq.R train.gbm.freq.hom5.R train.gbm.occurs.xor.libfm.R
File for the final ensembling ensembling.R
Python code for logistic regression logistic_regression.py
File with helper functions fn.base.R
To calculate model
- Copy initial train.csv and test.csv to the folder data.
- Copy libFM binary file (libfm.exe) to the folder libfm.
- Run all R files with prefix  (they can be run in parallel). To run any R file, open it in R GUI, set directory to the file location and run the code.
- Run all R files with prefix 
- Run ensembling.R
- The file prediction.csv contains final prediction for the test set.