0% found this document useful (0 votes)
7 views6 pages

Practical - 8

The document outlines practical applications of data transformation techniques in machine learning, including smoothing, aggregation, generalization, normalization, and feature construction using Python. It also discusses the significance of data visualization across various fields, emphasizing its role in decision-making and communication. Additionally, it covers professional ethics codes from ACM, IEEE, and AM Stat. Assoc., detailing their importance in guiding ethical behavior and decision-making in computing and statistical practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Practical - 8

The document outlines practical applications of data transformation techniques in machine learning, including smoothing, aggregation, generalization, normalization, and feature construction using Python. It also discusses the significance of data visualization across various fields, emphasizing its role in decision-making and communication. Additionally, it covers professional ethics codes from ACM, IEEE, and AM Stat. Assoc., detailing their importance in guiding ethical behavior and decision-making in computing and statistical practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

PRACTICAL - 8
AIM :
Study about different applications on which we can apply Data Transformation
Techniques. (Smoothing, Aggregation, Generalization, Normalization, Attribute/feature
construction).

SOL :
One popular application where data transformation techniques are commonly applied is in
the field of data preprocessing for machine learning. Let's consider a simple example using
Python and some common data transformation techniques including smoothing, aggregation,
generalization, normalization, and attribute construction.

First, we'll generate some sample data:


import pandas as pd
import numpy as np
data = {
'Date': pd.date_range(start='2022-01-01', end='2022-01-10'),
'Sales': [100, 120, 80, 90, 110, 85, 95, 105, 115, 125],
'Region': ['A', 'B', 'A', 'C', 'B', 'C', 'A', 'B', 'C', 'A']
}
df = pd.DataFrame(data)
print("Original Data:")
print(df)

Now, let's apply some data transformation techniques:


1. Smoothing: We'll use moving average to smooth the 'Sales' data.
2. Aggregation: We'll aggregate sales data by region.
3. Generalization: We'll generalize the 'Date' column to month.
4. Normalization: We'll normalize the 'Sales' column.
5. Attribute/Feature Construction: We'll create a new feature

'Sales_Percentage_Change'.
df['Smoothed_Sales'] = df['Sales'].rolling(window=3).mean()
aggregated_sales = df.groupby('Region')['Sales'].sum().reset_index()
df['Month'] = df['Date'].dt.month_name()
df['Normalized_Sales'] = (df['Sales'] - df['Sales'].min()) / (df['Sales'].max() -
df['Sales'].min())
df['Sales_Percentage_Change'] = df['Sales'].pct_change() 100
print("\nTransformed Data:")
print(df)
print("\nAggregated Sales:")
print(aggregated_sales)

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 23


Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

Output:

This will show the before and after results of applying the mentioned data transformation techniques.
Each technique will have its own specific effect on the data, which will be observable in the
transformed data compared to the original data.

Date:-__________ Signature:-__________

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 24


Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

PRACTICAL - 9
AIM :
Study about different Data Visualization applications.

SOL :
Data visualization finds utility across various domains and applications. Its theoretical
application spans disciplines like statistics, business intelligence, and data science. By visually
representing data through charts, graphs, and maps, it aids in the comprehension of complex
datasets, enabling users to identify patterns, trends, and outliers more efficiently. Through
effective visualization techniques, data can be transformed into actionable insights, facilitating
informed decision-making processes.

Moreover, it serves as a powerful communication tool, allowing stakeholders to convey


information effectively and engage audiences with compelling visual narratives. In essence,
data visualization enhances data exploration, analysis, and communication, making it
indispensable in fields such as scientific research, financial analysis, marketing, and more.

Tools for Data Visualization

Basic applications of data visualization encompass a diverse range of fields and tasks, each
leveraging visual representations to extract insights and drive decision-making. Five
fundamental applications include:

1. Business Intelligence: Businesses utilize data visualization to analyze key performance


indicators (KPIs), track sales trends, monitor market dynamics, and identify areas for
improvement.

2. Financial Analysis: Financial analysts employ visualization tools to interpret market data,
track investment performance, visualize financial ratios, and identify emerging market
trends.

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 25


Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

3. Dashboard Creation: Data dashboards integrate multiple visualizations into a unified


interface, providing users with a comprehensive overview of relevant metrics and
facilitating real-time monitoring and analysis.

4. Geospatial Analysis: Geographic data visualization enables the mapping of spatial


relationships, demographic trends, and distribution patterns, aiding in urban planning,
environmental monitoring, and resource allocation.

5. Scientific Research: Researchers visualize experimental data, simulation results, and


scientific phenomena to gain insights, communicate findings, and facilitate collaboration
within interdisciplinary teams.

Date:-__________ Signature:-__________

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 26


Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

Practical - 10

Aim :
Study about Professional ethics codes: ACM, IEEE, AM Stat. Assoc..

SOL :
The ACM Code of Ethics and Professional Conduct serves as a comprehensive
framework guiding ethical behavior within the computing community. It outlines principles
encompassing societal impact, honesty, privacy, and professionalism, providing guidance to
computing professionals worldwide.

The IEEE Code of Ethics, tailored for engineers in electrical, electronics, and computer fields,
emphasizes integrity, societal responsibility, and continuous improvement. Applicable to all
IEEE members and engineering professionals, it sets standards for ethical conduct in
engineering practice. The AM Stat. Assoc. Ethical Guidelines provide specific guidance for
statisticians and data scientists, emphasizing integrity, objectivity, confidentiality, and
accountability. These guidelines shape ethical conduct in data collection, analysis, and
interpretation, ensuring statistical practice aligns with ethical standards and societal
expectations.

Following are the various ways in which these codes are used:

1. Guidance for Practitioners: Professionals refer to these codes to understand their ethical
responsibilities in their daily work.

2. Education: They serve as educational tools in academic programs to teach students about
ethical conduct in their field.

3. Decision Making: Professionals consult these codes when facing ethical dilemmasto make
informed decisions.

4. Standardization: They contribute to standardizing ethical practices across the industry or


discipline.

5. Employment Contracts: Companies may incorporate adherence to these codes into


employment contracts to ensure ethical behavior from employees.

6. Regulation Compliance: They aid organizations in complying with legal and regulatory
requirements related to professional conduct.

7. Research Integrity: Researchers use these codes to maintain integrity in their research
practices, including data handling and publication ethics.

8. Consumer Trust: Adherence to these codes enhances consumer trust in products and

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 27


Niyati Patel ​ ​ IU2241230112​ ​ ​ ​ 6th CSE A

services provided by professionals or organizations.

9. Professional Reputation: Following ethical guidelines helps build and maintain a positive
reputation within the professional community and among clients.

10. Policy Development: Governments and regulatory bodies may use these codes to inform
the development of policies related to professional conduct and accountability.

Date:-__________ Signature:-__________

Data Preparation and Analysis​ ​ ​ ​ ​ ​ ​ ​ 28

You might also like