Skip to main content

Environment setup for machine learning

Hey guys, starting with the 2nd article of the course machine learning now, when you have a knowledge about machine learning we can move forward towards various installations we need to before getting started to the coding topics. In this article, you will learn how to setup the working environment for python machine learning on your local computer.


Libraries and packages and datasets:
To understand machine learning, you need to have basic knowledge of Python programming, like what are packages and libraries. In addition, there are a number of libraries and packages generally used in performing various important machine learning tasks as listed below - 
  • Numpy - is used for its N dimensional array objects.
  • pandas - is a data analysis library that includes dataframes.
  • matplotlib - is 2D plotting library for creating graphs and plots.
  • scikit-learn - the algorithms used for data analysis and data mining tasks.
  • seaborn - a data Visualization library based on matplotlib.
The datasets used in various examples in this article is available on the internet for free download. However, these datasets can also be downloaded from the articles useful resources center of this.

Installation:
You can install software for machine learning by following any of the two methods as discussed here-

Method 1:
Download and install Python application separately from python.org on various operating systems as explained below-
To install Python after downloading, double click the .exe (for Windows) or pkg (for Mac) file and follow the instructions on the screen(installing process).
For Linux OS, check if Python is already installed by using the following command at the prompt(check if it’s already installed).
If python 2.7 or later is not installed, install python with the distribution’s package manager. Note that the command and package name varies. On Debian derivatives such as Ubuntu, you can use apt-
Now, open the command prompt and run the following command to verify that python is installed correctly-
Similarly, we can download and install necessary libraries like numpy, matplotlib etc. individually using installers like pip. For this purpose you can use the commands shown here-

Method 2
Alternatively, to install Python and other scientific computing and machine learning packages simultaneously. We should install Anaconda distribution. It is a Python implementation for Linux, Windows and OSX, and comprises various machine learning packages like numpy, scikit-learn, and matplotlib. It also includes Jupyter Notebook an interactive Python environment. We can install Python 2.7 or any 3.x version as per our requirement.
To download the free Anaconda Python distribution from Continuum Analytics, you can do the following-
Visit the official site of Continuum Analytics and its download page. Note that the installation process may take 15-20 minutes as the installer contains Python, associated packages, a code editor, and some other files. Depending on your operating system, choose the installation process as explained here –
For Windows - Select the Anaconda for Windows section and look in the column with Python 2.7 or 3.x. You can find that there are two versions of the installer, one for 32-bit Windows, and one for 64-bit Windows. Choose the relevant one
For Mac OS - Scroll to the Anaconda for OS X section. Look in the column with Python 2.7 or 3.x. Note that here there is only one version of the install: the 64-bit version.
For Linux OS We select the "Anaconda for Linux" section. Look in the column with Python 2.7 or 3.x.
Note that you have to ensure that Anaconda Python distribution install into a single directory, and does not affect other Python installations, if any, on your system.
To work with graphs and plots, we will need these Python library packages - matplotlib and seaborn.
If you are using Anaconda Python, your system already has numpy, matplotlib, seaborn, etc. installed. We start the anaconda navigator to access either jupyter notebook or spyder IDE of python.
After opening either of them, type the following commands-
Now, we need to check if installation is successful. For this go to the command line and type in the following command-
Next, you need to import the required libraries and print their versions as shown-

Comments

Popular posts from this blog

Plasma Propulsion Rockets

Hey guys, here with you bringing another new article related to technology. Th topics on which this article is based on is none other but plasma propulsion rockets. An this surely a trending technology which is under development in the present but is surely going to a bright future in the upcoming years. With the higher velocity propulsion engine the rockets equipped with these technologies will will be able to travel much faster through the interstellar space. So heading on to the topic. A plasma propulsion engine is a kind of electric drive that creates thrust from a quassi-neutral plasma. This is in contrast to ion thruster engine, which produce thrust through extracting an ion current from the plasma source, which is then accelerated to high speeds utilizing grids/anodes. These exist in numerous structures. Plasma engines don't commonly utilize high voltage grids or anodes/cathodes to accelerate the charged particles in the plasma, rather utilizes currents and potenti...

How will adding a track-and-trace system save your business?

In 2019, $2.92M worth of cargo goods were stolen in the United States. While some of them were recovered, many are still missing. Recovery of goods can take anywhere between one week to a decade. This makes security a serious issue to consider before you export your goods. Track and trace systems are an excellent solution to this problem. A track and trace system allows you to transport packages without any worry of tampering or damage. These are often used while exporting goods to far-off countries but can easily be used when you’re transporting sensitive information in folders, files, or even small boxes. Features of track and trace systems: Packaging: The packaging usually contains anti-counterfeit and anti-tamper elements, meaning it can only be opened by the sender and the receiver.  Barcode: A barcode is often provided with the packaging that contains all the information regarding the product. This can also be utilized to track the package remotely. Anti-counterfeit element...

Reasons Why Employees Hate HR and Practices to Re-energize Employees

Do you recall your workplace and its employees being satisfied with the HR department? In most cases, the answer would be a big NO! Be it a large-sized organization or small businesses, the perception for HR remains the same.  Ever wondered how HR creates this impression about themselves across several companies? Is it their inability to perform the given task? Or their lack of understanding and support towards all employees ?  Well, there could be numerous reasons behind this, which we shall explore below. But one thing that is constant in all these complaints: employees are unhappy with the HR , hence project resentment towards them.  In more recent times, the department is viewed as untrained or inexperienced to handle certain situations hence making employees frustrated. It is ironic as the HR department is responsible for training and developing employees to reach greater heights. Contrary to the name Human Resources, the department lacks the 'human' element on th...