data science #2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

Who is John Snow and what is he known for?

Pioneer of data mapping; used a cholera map to trace disease to a water pump.

2
New cards

What are common sources of data?

Transactions, sensors, social media, surveys, observational studies.

3
New cards

What is the main goal of data science?

Extract insights from data using stats, programming, and domain knowledge.

4
New cards

What are the 5 C's of data ethics?

Consent, Clarity, Control, Consequences, Consistency.

5
New cards

What is the key idea in "The Signal and the Noise" (Ch. 1)?

Focus on identifying real patterns (signals) vs. random noise in data.

6
New cards

What does len("hello") return?

5

7
New cards

What does "Age: %d" % 25 output?

"Age: 25"

8
New cards

What does [1, 2, 3, 4][2:4] return?

[3, 4]

9
New cards

What does type(3.14) return?

float

10
New cards

What is the output of max([3, 9, 1])?

9

11
New cards

What does np.argmin([10, 5, 8]) return?

1 (index of smallest value)

12
New cards

What is a condition variable in NumPy?

A boolean array used to filter values, e.g., arr > 5.

13
New cards

What does arr[cv] do?

Returns values in arr where condition cv is True.

14
New cards

How do you load a CSV into a dataframe?

df = pd.read_csv("filename.csv")

15
New cards

How do you access a column named "Age"?

df["Age"]

16
New cards

How do you filter out NaN values in a column?

pd.notna(df["colName"])

17
New cards

How do you make a histogram using Matplotlib?

plt.hist(numbers, bins=10)

18
New cards

How do you make a barplot with Seaborn?

sns.barplot(x="col1", y="col2", data=df)

19
New cards

What does sns.heatmap(df.corr(), annot=True) do?

Displays a heatmap of correlations with annotations.

20
New cards

What does model.fit(X, y) do?

Trains a linear regression model on data.

21
New cards

How do you get the slope and intercept?

model.coef_ and model.intercept_

22
New cards

How do you make a prediction with x = 5?

model.predict([[5]])

23
New cards

What’s the key idea of "Prediction Machines"?

Machine learning reduces prediction cost, changing decision-making.

24
New cards

What are three types of machine learning?

Supervised, Unsupervised, Reinforcement.

25
New cards

What’s overfitting in machine learning?

When a model fits training data too closely and fails on new data.