Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Viewing all articles
Browse latest Browse all 9596

Python Machine Learning Mini-Course

$
0
0
From Developer to Machine Learning Practitioner in 14 Days

python is one of the fastest-growing platforms for applied machine learning.

In this mini-course, you will discover how you can get started, build accurate models and confidently complete predictive modeling machine learning projects using Python in 14 days.

This is a big and important post. You might want to bookmark it.

Let’s get started.


Python Machine Learning Mini-Course

Python Machine Learning Mini-Course

Photo by Dave Young , some rights reserved.

Who Is This Mini-Course For?

Before we get started, let’s make sure you are in the right place.

The list below provides some general guidelines as to who this course was designed for.

Don’t panic if you don’t match these points exactly, you might just need to brush up in one area or another to keep up.

Developers that know how to write a little code . This means that it is not a big deal for you to pick up a new programming language like Python once you know the basic syntax. It does not mean you’re a wizard coder, just that you can follow a basic C-like language with little effort. Developers that know a little machine learning . This means you know the basics of machine learning like cross-validation, some algorithms and the bias-variance trade-off . It does not mean that you are a machine learning Ph.D., just that you know the landmarks or know where to look them up.

This mini-course is neither a textbook on Python or a textbook on machine learning.

It will take you from a developer that knows a little machine learning to a developer who can get results using the Python ecosystem, the rising platform for professional machine learning.

Your Guide to Machine Learning withScikit-Learn
Python Machine Learning Mini-Course
Python and scikit-learn are the rising platform among professional data scientists for applied machine learning.

PDF and Email Course.

FREE 14-Day Mini-Course in

Machine Learning with Python and scikit-learn

Download Your FREE Mini-Course >>

Download your PDF containing all 14 lessons.

Get your daily lesson via email with tips and tricks.

Mini-Course Overview

This mini-course is broken down into 14 lessons.

You could complete one lesson per day (recommended) or complete all of the lessons in one day (hard core!). It really depends on the time you have available and your level of enthusiasm.

Below are 14 lessons that will get you started and productive with machine learning in Python:

Lesson 1 : Download and Install Python and SciPy ecosystem. Lesson 2 : Get Around In Python, NumPy, Matplotlib and Pandas. Lesson 3 : Load Data From CSV. Lesson 4 : Understand Data with Descriptive Statistics. Lesson 5 : Understand Data with Visualization. Lesson 6 : Prepare For Modeling by Pre-Processing Data. Lesson 7 : Algorithm Evaluation With Resampling Methods. Lesson 8 : Algorithm Evaluation Metrics. Lesson 9 : Spot-Check Algorithms. Lesson 10 : Model Comparison and Selection. Lesson 11 : Improve Accuracy with Algorithm Tuning. Lesson 12 : Improve Accuracy with Ensemble Predictions. Lesson 13 : Finalize And Save Your Model. Lesson 14 : Hello World End-to-End Project.

Each lesson could take you 60 seconds or up to 30 minutes. Take your time and complete the lessons at your own pace. Ask questions and even post results in the comments below.

The lessons expect you to go off and find out how to do things. I will give you hints, but part of the point of each lesson is to force you to learn where to go to look for help on and about the Python platform (hint, I have all of the answers directly on this blog, use the search feature).

I do provide more help in the early lessons because I want you to build up some confidence and inertia.

Hang in there, don’t give up! Lesson 1: Download and Install Python and SciPy

You cannot get started with machine learning in Python until you have access to the platform.

Today’s lesson is easy, you must download and install the Python 2.7 platform on your computer.

Visit the Python homepage and download Python for your operating system (linux, OS X or windows). Install Python on your computer. You may need to use a platform specific package manager such as macports on OS X or yum on RedHat Linux.

You also need to install the SciPy platform and the scikit-learn library. I recommend using the same approach that you used to install Python.

You can install everything at once (much easier) with Anaconda . Recommended for beginners.

Start Python for the first timeby typing “python” at the command line.

Check the versions of everything you are going to need using the code below:

# Python version importsys print('Python: {}'.format(sys.version)) # scipy importscipy print('scipy: {}'.format(scipy.__version__)) # numpy importnumpy print('numpy: {}'.format(numpy.__version__)) # matplotlib importmatplotlib print('matplotlib: {}'.format(matplotlib.__version__)) # pandas importpandas print('pandas: {}'.format(pandas.__version__)) # scikit-learn importsklearn print('sklearn: {}'.format(sklearn.__version__))

If there are any errors, stop.

Now is the time to fix them.

Lesson 2: Get Around In Python, NumPy, Matplotlib and Pandas.

You need to be able to read and write basic Python scripts.

As a developer, you can pick-up new programming languages pretty quickly. Python is case sensitive, uses hash (#) for comments and uses whitespace to indicate code blocks (whitespace matters).

Today’s task is to practice the basic syntax of the Python programming language and important SciPy data structures in the Python interactive environment.

Practice assignment, working with lists and flow control in Python. Practice working with NumPy arrays. Practice creating simple plots in Matplotlib. Practice working with Pandas Series and DataFrames.

For example, below is a simple example of creating a Pandas DataFrame .

# dataframe importnumpy importpandas myarray = numpy.array([[1, 2, 3], [4, 5, 6]]) rownames = ['a', 'b'] colnames = ['one', 'two', 'three'] mydataframe = pandas.DataFrame(myarray, index=rownames, columns=colnames) print(mydataframe) Lesson 3: Load Data From CSV Machine learning algorithms need data. You can load your own data from CSV files but when you are getting started wi

Viewing all articles
Browse latest Browse all 9596

Trending Articles