{
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.2"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0,
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "_cell_guid": "c5cfaef4-e81a-3db6-b95e-55f2d966667e"
      },
      "outputs": [],
      "source": "# -*- coding: utf-8 -*-\n\"\"\"\nThanks to tinrtgu for the wonderful base script\nUse pypy for faster computations.!\n\"\"\"\nimport csv\nfrom datetime import datetime\nfrom csv import DictReader\nfrom math import exp, log, sqrt\n\n\n# TL; DR, the main training process starts on line: 250,\n# you may want to start reading the code from there\n\n\n##############################################################################\n# parameters #################################################################\n##############################################################################\n\n# A, paths\ndata_path = \"../input/\"\ntrain = data_path+'clicks_train.csv'               # path to training file\ntest = data_path+'clicks_test.csv'                 # path to testing file\nsubmission = 'sub_proba.csv'  # path of to be outputted submission file\n\n# B, model\nalpha = .1  # learning rate\nbeta = 0.   # smoothing parameter for adaptive learning rate\nL1 = 0.    # L1 regularization, larger value means more regularized\nL2 = 0.     # L2 regularization, larger value means more regularized\n\n# C, feature/hash trick\nD = 2 ** 20             # number of weights to use\ninteraction = False     # whether to enable poly2 feature interactions\n\n# D, training/validation\nepoch = 1       # learn training data for N passes\nholdafter = None   # data after date N (exclusive) are used as validation\nholdout = None  # use every N training instance for holdout validation",
      "execution_state": "idle"
    }
  ]
}