Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Wednesday, July 10, 2013

Introduction to Data Science books and courses

    I was asked about books and courses that will help to get started with learning Data Science (Data Mining, Machine Learning or Data Analysis).
   My main toolchain is Python, NumPy/SciPy/Pandas/Scikit-learn, Hadoop and MRJob. Based on this I put together a list of books that will good to start with:

Python

Learning Python. Mark Lutz.
Book to learn Python before jumping to data science. 

Python for Data Analysis. Wes McKinney.
http://www.amazon.com/books/dp/1449319793
Book from the author of pandas module. Great book to learn how to do descriptive stats with Python.

Programming Collective Intelligence. Toby Segaran.
Introduction to self written Machine learning algorithms with Python.

Machine Learning in Action. Peter Harrington.
k-Nearest neighbors, naive Bayes, SVM, decision trees with examples in Python

Hadoop

Definitive guide from one of the early contributors to Hadoop source code and person with wast experience working with it.

R & Stats

Data Analysis with Open Source Tools. Phillipp K. Janert.
Sometimes Python is just not enough and this book will help to start working with R.

Think stats. Allen B. Downey.
If you are coming from Computer Science major you better get this book about probability theory and stats.

Good read on Data Science

Predictive Analytics Power Predict. Eric Siegel.
Good read on Predictive Analytics philosophy and examples of real world tasks that people solved with it.

Courses

  • Introduction to Data Science - Good introduction to all main concepts that data scientist should know (SQL, NoSQL, Hadoop, R, Machine learning algorithms and visualization and etc).
  • Computing for Data Analysis - Course about learning R and solving real problems with it.
  • Machine Learning - Basics of Machine learning from Andrew Ng (Founder of Coursera and Director of AI Lab in Stanford).
  • Computational Investment - Course that will teach how building a trade-robot for stock exchange in Python using all the tools that Data Scientist uses (see as practical examples).

    This list of books and courses will be updated when I'll find something worth reading or watching on this topic. If somebody knows a good book that I should add to this list - please, let me know.

Saturday, December 29, 2012

Pymisc module

    Pymisc - is module for miscellaneous utilities for your average python scripts and projects.
    This module was developed with same idea as "django-misc" that I've described before - to move utilities that are used frequently to specific location.
    To get it installed you can use GitHub (latest) version or PyPi (stable) version by installing via pip:
pip install git+git://github.com/ilblackdragon/pymisc.git
or for stable version from PyPI:
pip install pymisc
    Now, when it's installed on your machine, let's discuss what you can get from it:
  • decorators.py contains @logprint (enter and exit from function will be logged, as well as crashs that may happend) and @memorized (cachine decorator)
  • settings.py contains Settings class that provide near django.conf.settings experience  and additionally you actually can change values and they will be auto-saved when application closes.
  • utils package contains a long list of routines for different purposes, which I'll describe in github documentation one day
  • reader package contains couple csv utility modules that really when work hard with this format of data files
  • django and html are actually copies of django-misc stuff, so if you use it already - just ignore it
  • web.browser.Browser - is a class that provides some basic routines on top of usual urllib module to allow easier do json requests, download files and etc.
   I'll continue developing this module and adding more stuff (including some doc and examples), and if you have a piece of code that you thinks belongs in this kind of place - let me know or fork&pull-request on GitHub.

Thursday, May 12, 2011

Dive into Java

Today I decided to solve one task on Java. Task - DMC2011, and result of second must be Java-class.
So I can't write for example on Scala (which I read is pretty cool language). So first I started is googled "java suck" and found couple interesting texts, most interesting: http://www.slideshare.net/jeffz/why-java-sucks-and-c-rocks-final. Just real facts why java suck vs C# rocks - read it.
Next I wrote code, that go thought large (140mb) csv file and represent information in internal HashMap structure and then serialize it to file. When I run it I got to swap, so I stopped execution.
So now it's only 1/5 of file (~30mb) and I wrote Python code just to compare:
JavaPython
Lines of code7638
IMHO code looksuglynot so bad
Memory usage23.3%31.4%
Execution time (cpu)48 sec77 sec
Output file140mb150mb

In result, I can also note, that Java reads and makes structure very fast but take a long time to serialize and write to file. And Python contrary.

Still work on this stuff. Wish me good luck :)