Bitch ass CS

studied byStudied by 1 person
0.0(0)
Get a hint
Hint

Object-Oriented Programming (OOP)

1 / 78

flashcard set

Earn XP

Description and Tags

SLU 1030-McKenzie

79 Terms

1

Object-Oriented Programming (OOP)

A programming paradigm based on the concept of "objects," which can contain data and code to manipulate that data.

New cards
2

Encapsulation

implementation details are hidden or encapsulated in objects

New cards
3

Inheritance

child classes can inherit from parent classes and module

New cards
4

Polymorphism

objects and names exist in many forms. So, the same attribute or method can exist in multiple classes and mean different things, etc

New cards
5

Abstraction

handling a concept rather than the implementation details

New cards
6

Interpreters

Analyzes source code, generates byte code, and initializes the Python Virtual Machine (PVM). Ours for python is called CPython

New cards
7

Scope

LEGB Rule

New cards
8

Python Lists

Ordered and changeable collections in Python, written with square brackets, allowing for heterogeneous elements. The list can be homogeneous or heterogeneous, Element-wise operation is not possible on the list,Ā  Python list is by default 1-dimensional. But we can create an N-Dimensional list. But then too it will be 1 D list storing another 1D list, Elements of a list need not be contiguous in memory.

New cards
9

Numpy Arrays


Structured lists of numbers: Vectors, Matrices, Images, Tensors, ConvNet. Arrays can have any number of dimensions, including zero (a scalar) Arrays are typed: np.uint8,
np.int64, np.float32, np.float64. Arrays are dense. Each element of the array exists and has the same type. Arrays are faster than python lists (consume less memory). Can only combine arrays of the same shape!

New cards
10

Data Types in Python

Various types including str, int, float, list, dict, set, bool, bytes, and NoneType, each serving different purposes.

New cards
11

Classes

contain 3 types: static, class, and instance

New cards
12

Truthiness

The evaluation of values in conditional statements, where certain values equate to true or false.

New cards
13

Central Tendencies

represents the center point of ā€œtypicalā€ value of a dataset. As a rule, we replace null values with the mean when the data is normally distributed and replace null values with the median when the data is skewed.

New cards
14

Correlation Coefficient

A statistical measure indicating the strength and direction of a relationship between two variables, ranging from -1 to 1. also it looks like this

<p>A statistical measure indicating the strength and direction of a relationship between two variables, ranging from -1 to 1. also it looks like this</p>
New cards
15

Random Variables

x, is a variable where the possible outcomes are a
function of a random phenomena. The probability for any event is between 0 and 1, inclusive. The summation of the probabilities of each outcome equals 1

New cards
16

Random State

A method to generate pseudo-random numbers in computing.

New cards
17

Central Limit Theorem

A statistical principle stating that sample means will be normally distributed regardless of the population's distribution, given a large enough sample size.

New cards
18

Discrete Data

Finite and countable data values.

New cards
19

Continuous Data

Infinite data values that can take any numeric value.

New cards
20

Law of Large Numbers

as the sample size increases the sample mean gets closer to the population mean

New cards
21

Scales of Measurement

Different levels of data categorization including nominal, ordinal, interval, and ratio, each with unique properties.

New cards
22

Stdin and Stdout

Standard input and output streams for data processing in programming.

New cards
23

Data Cleaning

The process of correcting errors and inconsistencies in data to improve quality.

New cards
24

Preprocessing

cleaning up all null values, data cleaning (dashes, odd characters, handle missing and extreme outliers). One hot encoding, convert categorical to numerical sometimes its the same as onehotencod. Standardization/Normalization, deal with multicollinearity which can be cause by 3

New cards
25

Machine Learning

is a branch of artificial intelligence where algorithms use data to improve automatically through experience, without explicit programming. These algorithms identify patterns in large datasets, encompassing numbers, words, images, and more, enabling predictions or decisions. ML allows systems to adapt to new data without human intervention.

New cards
26

Supervised Learning

A type of machine learning using labeled training data to predict outcomes of classification or categorization using discrete values

New cards
27

Unsupervised Learning

A type of machine learning that does not use labeled data, focusing on finding patterns clustering from discrete values

New cards
28

Cross-Validation

testing performance of a machine learning model by training a model using the subset of the data and test the performance using a different subset with or without replacement.

New cards
29

Overfitting

problem that occurs when the model cannot make generalizations and fits too closely to the training data

New cards
30

Underfitting

problem that occurs when the model is overgeneralized.

New cards
31

Feature Selection

The process of selecting a subset of relevant features for model training to improve performance and reduce complexity.

New cards
32

KNN (K-Nearest Neighbors)

predicts the group of a datapoint based on majority ā€œvotesā€ from
nearest neighbors K represents the hyperparameter which
indicates how many data points any new datapoint must listen to in order to decide what class it is in

New cards
33

Linear Regression

is to model and predict the relationship between independent and dependent variables. Univariate linear regression predicts a
dependent variable from ONE independent variable whereas multiple linear regression predicts a dependent variable from MULTIPLE independent variables :y = mx + b

New cards
34

Multiple Regression

predicts a dependent variable from MULTIPLE
independent variables. ā€œMultivariateā€ means the result is a vector. We look at correlations, we compare the RĀ² values before and after a feature is added, and sklearn.feature_selection has many functions to assist with feature selection. * y = m1x1 + m2x2 + m3x3 + ... + b

New cards
35

Logistic Regression

Used when trying to predict the answer to a yes/no question or any binary question, response follows a S shaped curve.

New cards
36

Confusion Matrix

A table used to evaluate the performance of a classification algorithm by comparing predicted and actual outcomes.

New cards
37

Accuracy

number of correct predictions/ total predictions

New cards
38

Precision

true positive results / total predicted positives, indicating the accuracy of positive predictions.

New cards
39

Recall

The ability of a classifier to identify all relevant instances, measuring the proportion of true positives among actual positives. : tp/tp +fn

New cards
40

Relational Databases

Databases that use tables to store and manage structured data.

New cards
41

Cloud Databases

Databases that reside on cloud computing platforms, allowing for flexible data storage and access.

New cards
42

Distributed Databases

Databases that consist of data stored across multiple locations or sites.

New cards
43

Object-Oriented Databases

Databases designed to handle complex data types and relationships efficiently.

New cards
44

NoSQL Databases

Non-relational databases that allow for stattistacal analysis

New cards
45

What are the 4 scales of measurement

Nominal, Ordinal, Interval, and Ratio

New cards
46

What is Nominal

Categories that do not have a natural order Ex. blood type, zipcode, race

New cards
47

Ordinal

categories where order matters but the difference between them is neither clear nor even. Ex. satisfaction scores, happiness level from 1-10

New cards
48

Interval

There is an order and the difference between two values is meaningful. Ex. Temp(Cand F), credit scores, pH

New cards
49

Ratio

The same as interval except it has a concept of 0. There are no negative numbers Ex. concentration, Kelvin, weight

New cards
50

gitignore files

untracked files that are files that have been created within your repo's working directory but have not yet been added to the repository's tracking index using the git add command. Most files .File are hidden by defalut

New cards
51

Text types

str

New cards
52

Numeric Types

int, float, complex

New cards
53

Sequence

list, tupule, range

New cards
54

Mapping

dict

New cards
55

Set types

set, frozensets

New cards
56

Boolean type

bool

New cards
57

Binary types

bytes, bytearray, memoryview

New cards
58

NoneType

data that does not fit into any of these categories

New cards
59

Supervised and Unsupervised greatest difference

The biggest difference between supervised and unsupervised machineĀ learning is the type of data used. Supervised learning uses labeled training data, and unsupervised learningĀ does not. More simply, supervised learning models have a baseline understanding of what the correct outputĀ values should be.

New cards
60

How does KNN evaluate its performance

via accuracy

New cards
61

Multiple regression evaluation of performance

Use mean squared error and RĀ² (R-squared) to validate model performance. *really, this depends on the shape of the data. There are other statistical models and tests like ANOVA that we won't discuss here

New cards
62

How to evaluate performance of Linear regression

a method we can use to understand the relationshipĀ between one or more predictor variables (Xi) and a response variable (Y). R Square/Adjusted R Square.:Mean Square Error(MSE)/Root Mean Square Error(RMSE), Mean Absolute Error(MAE), illustrate Residual of model as a normal distribution ( bell shape), By OLS from statemodels.formula.

New cards
63

complete separation

happens when the outcome variable separates a predictor variable or a combination ofĀ predictor variables completely.

New cards
64

class method

can modify class state and cant modify object state. Its used for factory functions

New cards
65

Static Method

cant access class state and cant access object state. Used for utility functions.

New cards
66

Instance method

can modify class srtate and can modify object state

New cards
67

What are factory functions

separate the process of creating an object from the code that depends on the interface of the object

New cards
68

Utility functions

handle logic and checks(see if the person on the website is over 18, see if inputs meet particular requirements

New cards
69

Local Scope

only available to other code in this scope. A function, for example, only has access to the names defined in that function or passed into it via arguments.

New cards
70

Eclosing- scope

only exists for nested functions. Inner nests can have access to the names in outer nests

New cards
71

Global- Scope

vailable to all your code and can pass through modules, classes, etc

New cards
72

Built-in*Scope

all names that are created by Python when you run a script

New cards
73

Uniform Distribution

or a random variable, expected value is (a+b)/2, where a is the maximum possible value and b is the minimum

New cards
74

Binomial distribution

mean is the expected value, which is equal to n trials
* p probability

New cards
75

Standard normal distribution

mean is the expected value

New cards
76

Structured Databases

data that has no inherent structure and is usally stored as different types of files. Ex. text docs, Pdfs, images, and videos

New cards
77

Quasi-Structured

Textual data with erratic formats that can be formatted with effort and software tools Ex. clickstream data

New cards
78

Semi-structured

textual data files with an apparent patern enabling analysis Ex. Spreadsheets and XML files

New cards
79

Structured

Data having defined data model, format, and structure. Ex. database

New cards

Explore top notes

note Note
studied byStudied by 29 people
... ago
5.0(2)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 599 people
... ago
4.3(7)
note Note
studied byStudied by 37 people
... ago
5.0(2)
note Note
studied byStudied by 11 people
... ago
5.0(2)
note Note
studied byStudied by 14 people
... ago
5.0(1)
note Note
studied byStudied by 20 people
... ago
5.0(2)
note Note
studied byStudied by 3153 people
... ago
4.8(13)

Explore top flashcards

flashcards Flashcard (80)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (63)
studied byStudied by 9 people
... ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 10 people
... ago
5.0(2)
flashcards Flashcard (39)
studied byStudied by 32 people
... ago
5.0(1)
flashcards Flashcard (26)
studied byStudied by 35 people
... ago
5.0(1)
flashcards Flashcard (46)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (78)
studied byStudied by 123 people
... ago
5.0(3)
robot