We will use Python programming language for implementation of machine learning algorithms. First of all i want to give you introduction of python programming language.
Introduction to Python programming language:
Python is a simple, dynamic, general purpose high-level programming language intended to be quick (to learn, use and understand) and has very straight froward syntax.
Python does not need compilation to binary. You just run the program directly from the source code. Internally, python converts the source code into an intermediate form called bytecodes and then translate this into the native language of your computer and then runs it. All this, makes using python much easier.
Python supports procedure-oriented programming as well as object-oriented programming. In procedure oriented languages, the program is built around procedures or functions which are nothing but reusable peaces of programs. In object-oriented languages, the program is built around objects which combine data and functionality.
Introduction to python libraries:
Python is a great general-purpose programming language on its own, but with the help of a few popular libraries (numpy, pandas, matplotlib, etc) it becomes a powerful environment for scientific computing.
Here i am going to give you list of python libraries which we will be using in implementation of machine learning algorithm.
1) NumPy: NumPy is the fundamental package for scientific computing with Python. NumPy adds support for large, multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays.
2)SciPy: SciPy is an open source Python library used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and engineering.
3)Scikit-image: scikit-image is an open source image processing library for the Python programming language. It includes algorithms for segmentation, geometric transformations, color space manipulation, analysis, filtering, morphology, feature detection, and more. It is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy.
4)Scikit-learn: scikit-learn is a free machine learning library for the Python programming language. It features various classification, regression and clustering algorithms including support vector machines, random forests, gradient boosting, k-means and DBSCAN, and is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy.
5)Pandas: pandas is an open source library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.
6)Matplotlib: Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc., with just a few lines of code.
1)NumPy: pip install numpy
2)SciPy: pip install scipy
3)Scikit-image: pip install scikit-image
4)Scikit-learn: pip install scikit-learn
5)Pandas: pip install pandas
6)Matplotlib: pip install matplotlib
Windows user can also go to http://www.lfd.uci.edu/~gohlke/pythonlibs/ this site to download the above packages.
For Ubuntu and other open source users:
In command prompt type the below commands for installation of libraries.
1)NumPy: sudo pip install numpy
2)SciPy: sudo pip install scipy
3)Scikit-image: sudo pip install scikit-image
4)Scikit-learn: sudo pip install scikit-learn
5)Pandas: sudo pip install pandas
6)Matplotlib: sudo pip install matplotlib
In next post we will implement Linear regression algorithm. For implementing machine learning algorithm you need to download above libraries.
Introduction to Python programming language:
Python is a simple, dynamic, general purpose high-level programming language intended to be quick (to learn, use and understand) and has very straight froward syntax.
Python does not need compilation to binary. You just run the program directly from the source code. Internally, python converts the source code into an intermediate form called bytecodes and then translate this into the native language of your computer and then runs it. All this, makes using python much easier.
Python supports procedure-oriented programming as well as object-oriented programming. In procedure oriented languages, the program is built around procedures or functions which are nothing but reusable peaces of programs. In object-oriented languages, the program is built around objects which combine data and functionality.
Introduction to python libraries:
Python is a great general-purpose programming language on its own, but with the help of a few popular libraries (numpy, pandas, matplotlib, etc) it becomes a powerful environment for scientific computing.
Here i am going to give you list of python libraries which we will be using in implementation of machine learning algorithm.
1) NumPy: NumPy is the fundamental package for scientific computing with Python. NumPy adds support for large, multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays.
2)SciPy: SciPy is an open source Python library used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and engineering.
6)Matplotlib: Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc., with just a few lines of code.
How to install above libraries?
I am using python 3. version. You can download latest version of python from python official site from here https://www.python.org/
For Windows Users:
In command prompt type the below commands for installation of libraries.1)NumPy: pip install numpy
2)SciPy: pip install scipy
3)Scikit-image: pip install scikit-image
4)Scikit-learn: pip install scikit-learn
5)Pandas: pip install pandas
6)Matplotlib: pip install matplotlib
Windows user can also go to http://www.lfd.uci.edu/~gohlke/pythonlibs/ this site to download the above packages.
For Ubuntu and other open source users:
In command prompt type the below commands for installation of libraries.
1)NumPy: sudo pip install numpy
2)SciPy: sudo pip install scipy
3)Scikit-image: sudo pip install scikit-image
4)Scikit-learn: sudo pip install scikit-learn
5)Pandas: sudo pip install pandas
6)Matplotlib: sudo pip install matplotlib
In next post we will implement Linear regression algorithm. For implementing machine learning algorithm you need to download above libraries.
No comments:
Post a Comment