분류 전체보기
-
Binary Search TreeAlgoDS/DataStructure 2020. 1. 13. 10:19
1. Overview Unlike other sequential structures such as linked list, queue, stack, and array, which are one element after another and sort of a line of things, It has a hierarchical data structure like a tree. A tree whose elements have at most 2 children is called a binary tree. Since each element in a binary tree can have only 2 children, we typically name them the left and right child. Root: T..
-
GraphAlgoDS/DataStructure 2020. 1. 13. 01:18
1. Overview A Graph consists of a finite set of vertices(or nodes) and a set of edges that connect a pair of nodes. 2. Description 2.1 Components 2.1.1 Edge In the above Graph, the set of edges E = {(0,1), (1,2), (2,3), (3,4), (0,4), (1,4), (1,3)}. 2.1.2 Vertice In the above Graph, the set of vertices V = {0,1,2,3,4} 2.1.3 Adjacency matrix Represents graph with 'V' nodes into a VxV 0-1 matrix wh..
-
Population, Sample, and SamplingStats 2020. 1. 11. 14:59
1. Overview How to select good random samples from the population How to calculate the estimate of a population mean using samples How can I assure that the sample will provide adequate information about the population parameters 2. Description 2.1 Simple Random Sampling Method 2.1.1 finite population A simple random sample of size n from a finite population of size N is a sample selected such t..
-
Error MetricsMLAI 2019. 12. 19. 18:25
1. Overview An Error Metric is a type of Metric used to measure the error of a forecasting model. They can provide a way for forecasters to quantitatively compare the performance of competing models. These are also called loss functions. 2. Description 2.1 Error (Residual Error) $$Error=y-\hat{y}$$ Where actual values are denoted by y. Predicted values are denoted by $\hat{y}$ Ideal condition (h..
-
Cooperative vs Preemptive MultitaskingModeling/TheoremParadigm 2019. 11. 10. 14:08
1. Overview Cooperative multitasking, also known as non-preemptive multitasking, is a style of computer multitasking in which the operating system never initiates a context switch from a running process to another process. Instead, processes voluntarily yield control periodically or when idle or logically blocked in order to enable multiple applications to be run concurrently. This type of multi..
-
Context managerDynamicPL/Python 2019. 11. 9. 23:32
1. Overview Context managers allow you to allocate and release resources precisely when you want to. The most widely used example of context managers is the with a statement. Suppose you have two related operations which you’d like to execute as a pair, with a block of code in between. Context managers allow you to do specifically that. For example: 2. Description 2.1 Context In python, context ..
-
DecoratorsDynamicPL/Python 2019. 11. 7. 18:36
1. Overview In general a decorator function: Takes a function as an argument Returns a closure The closure usually accepts any combination of parameters Runs some code in the inner function (closure) The closure function calls the original function using the arguments passed to the closure Returns whatever is returned by that function call 2. Description 2.1 Decorator function def counter(fn): c..
-
ClosureDynamicPL/Python 2019. 11. 7. 17:09
1. Overview Closure can be consist of a function plus an extended scope that contains the free variables. 2. Description 2.1 Free Variable and Inner Function Functions defined inside another function can access the outer (nonlocal) variables def outer(): x = [1, 2, 3] print('outer:', hex(id(x))) def inner(): print('inner:', hex(id(x))) print(x) return inner fn = outer() fn() x is a free variable..