Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this exercise, we will be using adult.csv . we used this dataset extensively in chapter 1 . Read the dataset using Padans and call

For this exercise, we will be using adult.csv. we used this dataset extensively in chapter 1. Read the dataset using Padans and call it adult_df.
import pandas as pd
adult_df = pd.read_csv('adult.csv')
a) What type of values does the attribute eduction carry?
b) Run 'adult_df.education.unique()', study the results, and explain what the code does.
c) Based on your understandings, order the output of the code you ran for b).
d) Run 'pd.get_dummies(adult_df.education)', study the results, and explain what the code does.
e) Run 'adult_df.sort_values(['education-num']).iloc[1:32561:1200]', study the results and explain what the code does.
f) Compare your answer to c) and what you learned from e). Was the order you came up with in c) correct?
g) Education is an ordinal attribute, translating an ordinal attribute from an analytic perspective to a programming perspective involves choosing between Boolean representation, string representation, and integer representation. Choose which choice has been made for the three following representations of the attribute education.
- 'adult_df.education'
-'pd.get_dummies(adult_df.education)'
- 'adult_df[education]'
h) Either of the choices has some advantages and some disadvantages. Select which programing data representation each statement below describes.
- If an ordinal attribute is presented using this programming value representation, no bias or assumptions are added to the data, but algorithms that work with numbers cannot use the attribute.
- If an ordinal attribute is presented using this programming value representation, the data can be used by algorithms that only take numbers, but the size of the data becomes bigger and there may be concerns for computational costs.
- If an ordinal attribute is presented using this programming value representation, there will be no size or computational concerns, but some statistical information that may not be true is assumed and it may create bias.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

2.6 Define indigenous studies.

Answered: 1 week ago

Question

aDvAnTaGeS ANd DIsAdVaNtAgEs OF GrOuP DeCiSiOn MAkInG

Answered: 1 week ago