- 방문자수
전체 방문자
오늘 방문자
어제 방문자
Latest post
-
Diffusion model
TBD Last update : 2024/03/30
-
6. Approximation and fitting
Norm approximationBasic norm approximation problemAssume that the columns of AAA are independent.minimize ∥Ax−b∥\text{minimize }\|Ax - b\| minimize ∥Ax−b∥where A∈Rm×nA\in \R^{m\times n}A∈Rm×n with m≥nm\ge nm≥n, ∥⋅∥\|\cdot\|∥⋅∥ is a norm of Rm\R^mRmGeometric interpretationGeometrically, the solution x∗x^*x∗ is the point such that Ax∗∈R(A)Ax^*\in \mathcal R(A)Ax∗∈R(A) that closest to bbb. ..
-
5. Duality
LagrangianThe basic idea in Lagrangian duality is to take the constraints into account by augmenting the objective function with a weighted sum of the constraint functions.💡By using the Lagrangian, we can get a hint to solve the original problem which is not convex nor easy to solve.Standard form problem (not necessary convex)minimize f0(x)\text{minimize }f_0(x)minimize f0(x)subject tofi(x)≤0i=..
-
4. Convex optimization problems
hljs.initHighlightingOnLoad();Optimization problem in standard form@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')minimize f0(x)\text{minimize } f_0(x)minimize f0(x)subject to@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')fi(x)≤0, i=1,…,mhi(x)=0, i=1,…,pf_i(x) \le 0, \; i = 1, \dots, m \\ h_i(x) = 0, \; i = 1, \dots, pfi(x)≤..
-
3. Convex function
hljs.initHighlightingOnLoad();Convex function@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')f:Rn→Rf:\R^n \to \Rf:Rn→R is convex if @import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')dom f\text{dom }f dom f is a convex set and@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')f(θx+(1−θ)y)≤θf(x)+(1−θ)f(..
-
2. Convex set
hljs.initHighlightingOnLoad();Affine setLine : all points through @import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')x1,x2x_1, x_2x1,x2@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')x=θx1+(1−θ)x2x = \theta x_1 + (1 - \theta) x_2x=θx1+(1−θ)x2where @import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css')θ∈..
-
1. Introduction
Mathematical optimizationminxfo(x)s.t fi(x)≤bi, i=1,…,m\begin{align}\min_x & f_o(x) \\ \text{s.t }& f_i(x) \le b_i, \ i = 1, \dots, m\end{align}xmins.t fo(x)fi(x)≤bi, i=1,…,mwherex=(x1,…,xn)x = (x_1, \dots, x_n)x=(x1,…,xn): optimization variablesfo:Rn→Rf_o : R^n \to Rfo:Rn→R: objective function (a.k.a the function we want to minimize)💡In deep learning or machine learning perspective..
-
8. Users, Authorization & Security
Creating and Dropping usersTo create a user in MySQLUsername user can be followed by @ and the IP or the hostname from which the user is allowed to log in. Example:To drop a user: DROP USER userAuthorizationcontrol of what users can do in the database what they can see, create, modify, delete etcExercise 1What privileges are needed to be able to execute the following query?Answer:UPDATE (graduat..
-
7. Indexes and Transactions
IndexMotivationMySQL database, 10,000,000 peopleHow long does it take to find name and phone number for person with ID 4,857,845?How long does it take to find the phone number for all people named Kristin Elvik?The result of the second experiment is very slow. Why is it slow and what can we do about it?ExplanationThe slow query from the experiment performs a full table scan each row in the table..
-
6. SQL
Simple selectattribute : specifies a column in the resulttable_reference : the name of the tablewhere_condition : the condition that selected rows must satisfyExampleSelect DistinctTo remove duplicate rows from the result, we can use SELECT DISTINCTWhere ClauseLogical connections AND , OR , NOT can be used to create a more complex where conditionIS [NOT] NULLIS NULLIS NOT NULL💡NEVER use NULL nor..
-
5. Normalization
Issues with DBMS DesignData integrity failure : e.g. key doesn’t exists💡앞 장에서 다룬 integrity constraint의 경우에는 위의 data integrity가 깨지지 않는 것을 보장하는 것이고, normalization은 data integrity가 보존되게끔 data base를 design한다는 의미라고 이해하면 된다.NormalizationThe process of breaking bad relations/tables smaller good relations→ leads to a better DB designAvoids updating, deleting, and inserting anomaliesThe normalization pro..
-
4. ER to Relational Database Design
Regular Entity MappingMap each Regular Entity to a Relation with all simple attributesUnpack composite attribute💡즉 다시 말해서 name를 따로 column으로 만드는 것이 아니라 나머지만 취급하면 된다는 것이다.A primary key can also be a composite keyex : country code, car number💡아직 multivalued attribute를 어떻게 다룰 지에 대해서는 논의하지 않음Mapping of one-one Relation3 possible waysForeign key : Better to choose an entity with total participation→ 위..
-
3. The Relational Data Model
Converting ER to DBMS TablesProblem: This entity relationship does not have 1-1 direct mapping. So we can’t convert it directly💡예를 들어서 relationship같은 경우 어떻게 처리하고 저장할 것인지에 대해서는 ER model이 답하지 않는다. 따라서 DBMS table과 ER이 direct mapping되지 않는다는 것이다.그래서 Relational Data model 이 등장하게 된 것이다.💡Relational Model은 DBMS와 direct mapping할 수 있다.A Relation주의할 점은 Relationship와 relation은 구분해야한다는 것이다.Relationship: Entit..
-
2. Enhanced Entity-Relationship (EER) model
Subclasses and Superclasses SpecializationMay have several specializations of the same superclass💡subclass notation : ⊂\subset⊂💡OOP에서 Inheritance 개념과 유사하게 이해할 수 있다. subclass가 추가적인 attribute를 가지는 것이다. 💡만약 superclass가 특정 entity와 relationship을 가지고 있다면 subclass 또한 해당 entity와 relationship을 가지고 있음을 내재하고 있다 : OOP 개념으로 이해하면 자명하다.💡specialization은 결과적으로 subclass만이 가지는 일종의 member variable로 이해할 수 있다. 즉 이를 ..
-
1. Data Modeling Using the Entity Relationship (ER) Model
ER Model ConceptsEntitiesSpecific things or objects (e.g. student, course)Analogous to class of OOPHolds Set/Collection of objects : Entity setSame as table in DBMSWeak EntityAn entity without a key. But has partial key💡즉 key를 가지고 있기는 하지만 그 자체만으로는 안되는 것을 의미한다. 위의 예시의 경우에는 loan이라는 entity는 반드시 customer entity를 요구하는 케이스이다.Dependent on other entity (owner entity)Participation: mandatory/total-partic..
-
Summary