Python – Statistics – Regression and Classification

Regression and Classification Regression models Getting started Regression is a technique used to model and analyze the relationships between variables contribute to producing a particular outcome. More concretely, it’s a way to determine which variables have an impact, which don’t, which factors interact, and how certain we are about this. (most common techniques – linear […]

Python – Statistics – EDA

Exploratory Data Analysis Descriptive Statistics Working with categorical data Relationship between two variables Descriptive Statistics what it sound like  help you describe the data with numerical calculations or plots many types – focus on most common ones : measures of centrality – measures of variability Measures of centrality Mean The mean is the average, which […]

SQL – Basic SQL on one table

SQL BASICs Order of SQL Operations FROM –> table selectopn WHERE –> row(s) selection GROUP BY –> rows grouping by column Aggregations on columns –> in SELECT  or ORDER BY HAVING –> in case you have to select on an aggregated value WINDOW functions –> operations on a selection of rows SELECT –> column selection […]

Python – Object Oriented Programming – Design Inheritance & Properties

Best Practices Designing for Inheritance and Polymorphism Polymorphism   Interface # Withdraw amount from each account in list_of_accounts def batch_withdraw(list_of_accounts, amount): for acct in list_of_accounts: acct.withdraw(amount) b, c, s = BankAccount(1000), CheckingAccount(2000), SavingsAccount(3000) batch_withdraw([b,c,s]) # uses bankaccount.withdraw, checking, Savings batch_withdraw() doesn’t need to check the object to know which withdraw() to call Liskov substitution principle […]

Python – Object Oriented Programming – Exceptions

Integration with Python Operator overloading : comparison Object equality class Customer: def __init__(self, name, balance):, self.balance = name, balance cust1 = Customer(“John Fisher”, 2100) cust2 = Customer(“John Fisher”, 2100) cust1 == cust2 > False   Variables are references class Customer: def __init__(self, name, balance, id):, self.balance = name, balance = id cust1 […]

Python – Object Oriented Programming – Class Inheritance

Inheritance and Polymorphism Instance and Class Data Core Principles of OOP Inheritance Extending functionality of existing code Polymorphism Creating an unified interface Encapsulation Bundling of data and Methods Instance-level data class Employee: def __init__(self, name, salary): = name self.salary = salary emp1 = Employee(“Theo Mill”, 50000) emp2 = Employee(“Martina Kosova”, 65000) name , salary […]

Python Basics – Boolean Operations

Boolean Operations Boolean logic consists of operations done between True and False values : and ( logical conjunction) or ( logical disjunction) not ( logical negation ) Object Evaluation Evaluates as False Constants : False and None Numeric zero : 0 and 0.0 Lengths of zero : “” and [] Evaluates as True everything else […]