Giter Site home page Giter Site logo

kaggle_ops's Introduction

kaggle_ops

My best submission to the Kaggle competition "Online Product Sales", ranked 21th over 366 teams (score: 0.57885).

http://www.kaggle.com/c/online-sales/leaderboard


Requirements:

  1. NumPy, scikit-learn

  2. Pandas, http://pandas.pydata.org/ , just to create the initial dataset or to explore it.

  3. joblib, http://packages.python.org/joblib/ , if you want to run blender_parallel.py , i.e. to use all your cores with GradientBoostingRegressor().

  4. The "Online Product Sales" trainset/testset files to be put in the subdirectory "data/".


Usage:

  • "python explore.py" to have a look to the quantitative variables and to decided which of them to put in the logscale.

  • "python create_dataset.py" , creates and save the dataset from the initial trainset/testset files.

  • "python blender.py" computes the actual submission (simple blending of GradientBoosting).

  • "python blender_parallel.py" computes the actual submission splitting the computation on as many cores as you like.

kaggle_ops's People

Contributors

emanuele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kaggle_ops's Issues

Quan Logs

  1. This is regarding the the explorer.py file. Is there a reason by you left out Quan_1-3, 20?

quantitative_columns = list(filter(lambda s: s.startswith("Quan"), df.columns))

This is the list of variables to show in logscale:

to_log = ["Quan_4", "Quan_5", "Quan_6", "Quan_7", "Quan_8", "Quan_9", "Quan_10", "Quan_11", "Quan_12", "Quan_13", "Quan_14", "Quan_15", "Quan_16", "Quan_17", "Quan_18", "Quan_19", "Quan_21", "Quan_22", "Quan_27", "Quan_28", "Quan_29", "Quant_22", "Quant_24", "Quant_25"]

explorer.py

Hi Emanuele,

I'm getting this error with this piece of code:
"ValueError: num must be 1 <= num <= 25, not 0"

for i, col in enumerate(quantitative_columns):
a = df[col]
print(col, pandas.isnull(a).sum())
plt.subplot(5,5,i)
if col in to_log:
a = np.log(a)
plt.hist(a[pandas.notnull(a)], bins=30, label=col)
plt.legend()
print(len(quantitative_columns))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.