Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
24 views

Machine Learning Lab Set1

Uploaded by

michaeljohn9808
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Machine Learning Lab Set1

Uploaded by

michaeljohn9808
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GOVERNMENT FIRST GRADE COLLEGE

T.Dasarahalli, Bengaluru.
Department of Computer Applications

Machine Learning Lab Manual


NEP- BCA Sixth Semester LAB- (CA-C29L)
(NEP Scheme) 2023-2024

1. Install and set up Python and essential


libraries like NumPy and pandas.
Dr. Rashmi M
Faculty in Computer Science,
GFGC, T.Dasarahalli, Bengaluru.
CA-C29L: Machine Learning Lab BCA VI Sem
1. Install and set up Python and essential libraries like NumPy and pandas.

Installation of Python

Step 1: Search for Python

Type “Python download” in the Google search bar and press Enter key. In the list of links shown, select the
very link or click on the official website link: https://www.python.org/downloads/

Step 2: Select Version to Install Python

Choose the correct link for your device from the options provided: either Windows installer (64-bit) or
Windows installer (32-bit) and proceed to download the executable file.

Step 3: Downloading the Python Installer

Once you have downloaded the installer, open the .exe file, such as python-3.11.5-amd64.exe, by double-
clicking it to launch the Python installer. Choose the option to install the launcher for all users by checking
the corresponding checkbox, so that all users of the computer can access the Python launcher application.
Enable users to run Python from the command line by checking the Add python.exe to PATH checkbox. After
Clicking the Install Now Button the setup will start installing Python on your Windows system.

Dr. Rashmi M, Dept of Computer Science, GFGCT. Dasarahalli |1


CA-C29L: Machine Learning Lab BCA VI Sem

Step 4: Verify the Python Installation in Windows

After successful installation of Python, close the installation window. You can check if the installation of
Python was successful by using either the command line or the Integrated Development Environment (IDLE),
which you may have installed. To access the command line, click on the Start menu and type “cmd” in the
search bar.

Then click on Command Prompt, type the command “python –V” or “python –version”. You can see installed
version of Python on your system.

Go to Python Integrated Development Environment (IDLE). In Windows search bar, type IDLE and you can
see “IDLE (Python 3.11.64- bit)”. Open IDLE on the IDLE screen itself you can see version. This gives the
conformation of successful installation of python.

Dr. Rashmi M, Dept of Computer Science, GFGCT. Dasarahalli |2


CA-C29L: Machine Learning Lab BCA VI Sem
Installation of essential packages Numpy and Pandas.

a) Install numpy package.

NumPy is an open-source Python library that facilitates efficient numerical operations on large quantities of
data. There are a few functions that exist in NumPy that we use on pandas DataFrames. The most important
part about NumPy is that pandas is built on top of it which means Numpy is required for operating the Pandas.

It is defined as a Python package used for performing the various numerical computations and processing of
the multidimensional and single-dimensional array elements. The calculations using Numpy arrays are faster
than the normal Python array. It is also capable of handling a vast amount of data and convenient with Matrix
multiplication and data reshaping. Steps to install Numpy is,

Step 1: Open command prompt, CMD.

Step 2: Type the command,

C:\Users\DELL> py –m pip install numpy

Or

C:\Users\DELL>pip3 instal numpy

Step 3: Upgrade the software by the command

C:\Users\DELL> py –m pip install - -upgrade pip

Or

C:\Users\DELL> pip3 install - -upgrade pip

Step 4: On the successful installation, you can type following two commands at command prompt. If python
prompt “>>>” appears then package is successfully installed.

1. C:\Users\DELL>python
2. >>>import numpy

Dr. Rashmi M, Dept of Computer Science, GFGCT. Dasarahalli |3


CA-C29L: Machine Learning Lab BCA VI Sem
b) Install pandas package.

Pandas is a very popular library for working with data (its goal is to be the most powerful and flexible open-
source tool, and in our opinion, it has reached that goal). DataFrames are at the center of pandas. A
DataFrame is structured like a table or spreadsheet. The rows and the columns both have indexes, and you
can perform operations on rows or columns separately. It can perform five significant steps required for
processing and analysis of data irrespective of the origin of the data, i.e., load, manipulate, prepare, model,
and analyze. Steps to install pandas is,

Step 1: Open command prompt, CMD.

Step 2: Type the command,

C:\Users\DELL> py –m pip install pandas

Or

C:\Users\DELL>pip3 instal pandas

Step 3: Upgrade the software by the command

C:\Users\DELL> py –m pip install - -upgrade pip

Or

C:\Users\DELL> pip3 install - -upgrade pip

Step 4: On the successful installation, you can type following two commands at command prompt. If python
prompt “>>>” appears then package is successfully installed.

1. C:\Users\DELL>python
2. >>>import pandas

Dr. Rashmi M, Dept of Computer Science, GFGCT. Dasarahalli |4

You might also like