DSML Practical
DSML Practical
DSML Practical
Assignment 1
AIM: Perform the following operations using R/Python on suitable data sets, read data from
different formats (like csv, xls), indexing and selecting data, sort data, describe attributes of data,
checking data types of each column, counting unique values of data, format of each column,
converting variable data type (e.g. from long to short, vice versa), identifying missing values and
fill in the missing values
OBJECTIVE: Describe the Data Science Process and explore components interaction.
Apply statistical methods for pre-processing and extracting meaning from data to the
application dataset.
ALGORITHM:
An algorithm is a step-by-step procedure or a set of rules for solving a specific problem or
completing a specific task. It serves as a blueprint for performing computations, data processing,
and automated reasoning. Algorithms can be found in various fields such as mathematics, computer
science, and engineering. Here are the key components and characteristics of an algorithm:
Components of an Algorithm:
1. Input: Algorithms take some input as parameters. This input can be zero or more in quantity.
2. Output: Algorithms produce output based on the given input.
3. Definiteness: Each step of the algorithm must be precisely defined and clear.
4. Finiteness: The algorithm must terminate after a finite number of steps.
5. Effectiveness: Every step of the algorithm should be feasible and practical to perform.
6. Correctness: The algorithm should solve the problem it is designed to solve accurately.
Characteristics of Algorithms:
Types of Algorithms:
1. Searching Algorithms: These algorithms are used to find a specific item in a collection of
items. - Examples: Linear Search, Binary Search.
2. Sorting Algorithms: Sorting algorithms arrange items in a specific order, such as numerical
or lexicographical. - Examples: Bubble Sort, Quick Sort, Merge Sort.
3. Graph Algorithms: Graph algorithms operate on graphs or networks and are used to solve
problems related to connections and relationships. - Examples: Depth-First Search (DFS), Breadth-
First Search (BFS).
4. Divide and Conquer Algorithms: These algorithms break a problem into smaller
subproblems, solve them, and then combine their solutions to solve the original problem. -
Examples: Merge Sort, Quick Sort.
6. Greedy Algorithms: Greedy algorithms make locally optimal choices at each step with the
hope of finding a global optimum. - Examples: Dijkstra's Algorithm for finding the shortest path.
Code: