Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DSML Practical

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Name: Shreyas Satish Jagadale

Roll No. 322030


Batch B2
PRN:22110649

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:

1. Sequential: Algorithms consist of a sequence of steps, each performing a specific operation.


2. Repetitive: Algorithms often contain loops or recursive structures to repeat certain steps until a
specific condition is met.
3. Conditional: Algorithms include decision-making processes where the flow of steps can be altered
based on specific conditions.
4. Deterministic: Given the same input, an algorithm will always produce the same output.
5. Optimality: Algorithms can be optimized for factors such as speed, memory usage, or other
resources.
6. Scalability: Good algorithms can handle larger inputs efficiently without a significant increase in
resources.

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.

5. Dynamic Programming Algorithms: Dynamic programming algorithms solve problems by


breaking them down into overlapping subproblems. - Examples: Fibonacci Series using Dynamic
Programming.

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.

7. Recursive Algorithms: Recursive algorithms solve problems by solving smaller instances of


the same problem.
- Example: Factorial Calculation using Recursion.

Code:

You might also like