100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Summary of all Datacamp modules for Data Science Skills with import codes and steps to perform analysis (325243-M-6))

Beoordeling
4,0
(1)
Verkocht
6
Pagina's
42
Geüpload op
23-06-2023
Geschreven in
2022/2023

This document contains a summary of all datacamp modules with all important codes, functions, methods and steps to perform certain analysis. Useful for pacticing before the exam.












Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Geüpload op
23 juni 2023
Aantal pagina's
42
Geschreven in
2022/2023
Type
Samenvatting

Voorbeeld van de inhoud

Total summary of Data Science skills
Inhoud
Chapter 1: Introduction ........................................................................................................................................... 3
Chapter 2: Intermediate python ............................................................................................................................. 5
Chapter 3: DataFrames............................................................................................................................................ 8
Chapter 4: Supply chain Analytics in Python ......................................................................................................... 12
Chapter 5: Cleaning data in Python ....................................................................................................................... 20
Chapter 6: Cluster analysis .................................................................................................................................... 21
Chapter 7: Machine learning with scikit-learn (model testing) ............................................................................. 30
Chapter 8: Introduction ......................................................................................................................................... 33




1

,Chapter 1: Introduction

Python basics Variables, types
Lists and sublists Indexes, slicing, manipulating/changing, functions, methods
Numpy 2d arrays, statistics, generate data

Chapter 2: Intermediate python

Matplotlib Basic plots, customization
Dictionaries & pandas Create, indexes, slicing, manipulating/changing, loc, iloc,
Logic control flow & filter Operators, Booleans, (Logical_)and/or/not, if/else filtering
Loops While loop, for loop, iterrows

Chapter 3: DataFrames

Transforming Methods, sorting and subsetting, manipulating/changing
Summary statistics .agg method, counting, groupedby, pivot tables,
Slicing and indexing Indexing, outer/inner indexing, loc/iloc, sorting
Visualizing DataFrame Basic plots, missing values, creating DataFrames,

Chapter 4: Supply chain Analytics in Python (Linear optimizing)

Optimization & PuLP Linear programming, decision variables, lpSum
PuLP modelling List comprehension, logical constraints
Solve and evaluate model Common mistakes, solve PuLP model, sanity checking
Sensitivity analysis Shadow pricing, testing solution

Chapter 5: Cleaning data in Python

Data problems Type constraints, numeric or categorical, range constraints, duplicates
Categorical problems Inconsistent, cleaning text data,
Advanced problems Uniformity, date formatting, cross field validation, missing data
Record linakage Comparing string, edit distance, generating pairs, linking dataframes

Chapter 6: Cluster analysis

Introduction clustering Unsupervised learning, labelled/unlabelled data, hierarchical clustering, k-means
Hierarchical clustering Different methods, cluster labels, visualize clusters, limitations
K-means Generate & cluster labels, Elbow method, limitations, seeds
Real world clustering Images, document clustering, clustering multiple features

Chapter 7: Machine learning with scikit-learn (model testing)

Classification Supervised learning, exploratory data analysis, nearest neighbours, predicting,
model performance (train/test split)
Regression Linear regression, cross validation, regularization
Fine-tuning model Class imbalance, confusion matrix, ROC curve, probabilities, hyper parameter
Pre-processing & pipelines Dummy variable, missing data, pipleline, centring & scaling

Chapter 8: Linear classifiers

Logistic regression & SVM Fitting and predicting, model evaluation, LinearSVC, boundaries
Loss functions Linear classifiers, predictions, least squares, loss function diagrams
Logistic regression L1 & L2 Regularization, training accuracy, probabilities, multi-class regression
Support vector machines Support vectors, decision boundaries, kernel SVMs, comparing




2

,Chapter 1: Introduction
Variables and types
• Variables: Variable = value
• Types: Type(‘variable’) (Float, Integer, Strings, Booleans, List, Dictionary, etc.)
> Different behaviour using operators for different types of floats.
> When working with different types -> Convert if necessary before using operators.

Python lists
• Lists: Lists are used for storing small amounts of one-dimensional data containing different types.



• Sublists: One list can contain more sublists

> But, can’t use directly with arithmetical (matrix) operators (+, -, *, /, ...)

Subsetting lists and slicing (indexes)
• Element: The number in a list.
• Index: The index of an element in the list, it starts at 0.

• Slicing: Select multiple elements in a list and creating a new list.
> [Start : End] -> Start is included, End is excluded!
> Start or end at index 0: [:4] & [5:]

Subsetting lists of lists
x[rows][columns] x[2][:2] returns [‘g’, ‘h’]

Manipulations (change the list)
1. Change/replace: Fam [7] = 1.86 Changes the height of dad
2. Change slice: Fam [0:2] = [“Lisa”, 1.74] Changes the 0 and 1 index to new value
3. Adding/extend: Fam + [“me”, 1.79] Adds ‘me’ and 1.79 to the list
4. Remove: del(fam[2]) Removes “emma’’ from the list
> Watch out because the indexes of the list have now changes!

How lists work
> The list is saved on your computer, while the variable references to it.
> Want to create a new variable containing an existing list > Don’t refer to the existing variable with the list.
> Create new list, use: x = [‘a’, ‘b’, ‘c’] y = list(x) or y = x[:]

Functions and packages
• Function: a piece of reusable code, aimed at solving a particular task (on a certain variable for example).
> Function(‘variable’)
> Examples: type(), print(), str(), int(), float(), bool(), max(), round(), len(), sorted()
> Use help(‘function’) to get more information of how the function works and the inputs (documentation).

• Methods: functions that belong to objects, depending in type of object there are different methods.
> object.method(‘element’)
• List methods syntax: ‘list’.method(‘element’) example: fam.index(“mom”) =4
• String methods syntax: ‘variable’.method() example: sister.capitalize() = ‘Liz’
Strings: Lists:
x.len() x.append(element)
x.upper() x.remove(element)
x.capitilize() x.index(element)
x.replace() x.sort()

> Different methods can behave differently depending on the type or change the object

3

, Packages (Numpy, matplotlib, scikit-learn, etc.)
• Packages: directory of python scripts, containing modules with new methods, functions and types.
You will have to install new packages in your own system.

Importing a package or a module of a package
1. > numpy.array()
2. > np.array() (preferred)
3. > array() (onhandig)(verwarrend met pakketten)

Numpy (Numeric Python)
> The NumPy array is similar to the list, but has one additional feature: performing calculations on entire arrays.

1. Import numpy package as np.
2. Change the regular lists into a NumPylist to do calculations using np.array(‘list’)
3. Do calculations with the arrays

> NumPy arrays can only use one type! If not, it will automatically convert to strings (homogenous).
> Regular lists and NumPy arrays have different behaviours when e.g. using operators.

Subsetting NumPy arrays




(1) (2)

2D Numpy Arrays (list of lists / 2 rows) Subsetting




Statistics
np.mean(array[])
np.median(array[])
np.min(array[])
np.max(array[])
np.sum(array[])
np.std(array[])
np.corrcoef(array1[], array2[])

Generate data




4

Beoordelingen van geverifieerde kopers

Alle reviews worden weergegeven
1 jaar geleden

4,0

1 beoordelingen

5
0
4
1
3
0
2
0
1
0
Betrouwbare reviews op Stuvia

Alle beoordelingen zijn geschreven door echte Stuvia-gebruikers na geverifieerde aankopen.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
jesmen12 Tilburg University
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
136
Lid sinds
3 jaar
Aantal volgers
70
Documenten
13
Laatst verkocht
3 dagen geleden

4,0

10 beoordelingen

5
4
4
2
3
4
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen