├── .gitignore ├── AI ├── assets │ ├── image-20190319191526000.png │ ├── image-20190319191528911.png │ ├── image-20190319200352056.png │ ├── image-20190326164402568.png │ ├── image-20190329192304896.png │ ├── image-20190413170900279.png │ ├── image-20190413170902859.png │ ├── image-20190413171503222.png │ ├── image-20190413180302784.png │ ├── image-20190413180850355.png │ ├── image-20190619102459841.png │ ├── image-20190619112916296.png │ ├── image-20190619113007408.png │ ├── image-20190619113028741.png │ ├── image-20190619125222634.png │ ├── image-20190619161618966.png │ ├── image-20190619170941427.png │ ├── image-20190621145138525.png │ ├── image-20190621221706911.png │ ├── image-20190621222320051.png │ ├── image-20190621222346716.png │ ├── image-20190621230616254.png │ ├── image-20190621231259631.png │ ├── image-20190621231332372.png │ ├── image-20190621232217585.png │ ├── image-20190621234315572.png │ ├── image-20190622000823887.png │ ├── image-20190622001731534.png │ ├── image-20190622002114723.png │ └── image-20190622002136247.png ├── week1.md ├── week10.md ├── week11.md ├── week2.md ├── week3.md ├── week4.md ├── week5.md ├── week6.md ├── week8.md └── week9.md ├── COMP90015 DS └── Note │ └── Week1.md ├── COMP90020 DA ├── Consensus.md ├── Distributed Transactions.md ├── Election.md ├── Failure Detection and Mutual Exclusion.md ├── GlobalStates.md ├── Multicast.md ├── Time.md ├── Transaction Recovery.md ├── Transactions and Concurrent Control.md └── assets │ ├── image-20200620153349594.png │ ├── image-20200620162210280.png │ ├── image-20200620184017877.png │ ├── image-20200620184104273.png │ ├── image-20200620185448513.png │ ├── image-20200620185500061.png │ ├── image-20200620185511625.png │ ├── image-20200620203349450.png │ ├── image-20200620205106778.png │ ├── image-20200620224342225.png │ ├── image-20200620234326639.png │ ├── image-20200622224402487.png │ ├── image-20200623120417633.png │ ├── image-20200623120445728.png │ ├── image-20200623120502303.png │ ├── image-20200623141635041.png │ ├── image-20200623145844041.png │ ├── image-20200623150634863.png │ ├── image-20200623150643748.png │ ├── image-20200623150646191.png │ ├── image-20200623171703398.png │ ├── image-20200623174926353.png │ ├── image-20200623174928267.png │ ├── image-20200623180031980.png │ ├── image-20200623180921599.png │ ├── image-20200623182007961.png │ ├── image-20200623182015332.png │ ├── image-20200623211752488.png │ ├── image-20200623211848092.png │ ├── image-20200623213600412.png │ ├── image-20200624144905938.png │ ├── image-20200624144918380.png │ ├── image-20200624145002433.png │ ├── image-20200624145306268.png │ ├── image-20200624150121470.png │ ├── image-20200624150528381.png │ ├── image-20200624150534221.png │ ├── image-20200624150546750.png │ ├── image-20200624151858300.png │ ├── image-20200624151925809.png │ ├── image-20200624152858858.png │ ├── image-20200624152950424.png │ ├── image-20200624153054109.png │ ├── image-20200624153119943.png │ ├── image-20200624153230274.png │ ├── image-20200624153253236.png │ ├── image-20200625115246327.png │ ├── image-20200625115326564.png │ ├── image-20200625120530471.png │ ├── image-20200625121512927.png │ ├── image-20200625132531990.png │ ├── image-20200625133039681.png │ ├── image-20200625134056362.png │ ├── image-20200625135002921.png │ ├── image-20200625153826013.png │ ├── image-20200625160009099.png │ ├── image-20200625160328787.png │ ├── image-20200625162503497.png │ ├── image-20200625163008754.png │ ├── image-20200625202723502.png │ ├── image-20200625231954641.png │ ├── image-20200625231956986.png │ ├── image-20200626001040185.png │ ├── image-20200626003927474.png │ ├── image-20200626004030110.png │ ├── image-20200626004041005.png │ ├── image-20200626112014470.png │ ├── image-20200626112025049.png │ ├── image-20200626121311132.png │ ├── image-20200626140953413.png │ ├── image-20200626141006349.png │ ├── image-20200626143926380.png │ ├── image-20200626144547172.png │ ├── image-20200626144554923.png │ ├── image-20200626150208685.png │ ├── image-20200626160636253.png │ ├── image-20200626160703648.png │ ├── image-20200626161936568.png │ ├── image-20200626162000271.png │ ├── image-20200626162651298.png │ ├── image-20200626163447744.png │ ├── image-20200626170442183.png │ ├── image-20200626171249897.png │ ├── image-20200626180045417.png │ ├── image-20200626181040262.png │ ├── image-20200626181431381.png │ ├── image-20200626181756468.png │ ├── image-20200626190716211.png │ ├── image-20200626190722793.png │ ├── image-20200626190729763.png │ ├── image-20200629162622577.png │ ├── image-20200629163434571.png │ ├── image-20200629220603352.png │ ├── image-20200630155113214.png │ ├── image-20200701110722817.png │ ├── image-20200701175533905.png │ └── image-20200701180043881.png ├── COMP90024 CCC └── Note │ ├── Week10.md │ ├── Week3.md │ ├── Week6.md │ ├── Week7.md │ ├── Week8.1.md │ ├── Week8.2.md │ ├── Week8.3.md │ ├── Week9.md │ ├── assets │ ├── cap.png │ ├── image-20200606224408873.png │ ├── image-20200606224720570.png │ ├── image-20200606224947716.png │ ├── image-20200606225050281.png │ ├── image-20200607123750232.png │ ├── image-20200607125015337.png │ ├── image-20200607125729184.png │ ├── image-20200607151339810.png │ ├── image-20200607173548515.png │ ├── image-20200607185126728.png │ ├── image-20200607190603447.png │ ├── image-20200607192935563.png │ ├── image-20200608000121707.png │ ├── image-20200608003142952.png │ ├── image-20200608161004587.png │ ├── image-20200608181037953.png │ ├── image-20200608181441391.png │ ├── image-20200608182903922.png │ ├── image-20200608183029109.png │ ├── image-20200608185909067.png │ ├── image-20200608230109926.png │ ├── image-20200609181134447.png │ ├── image-20200609194748538.png │ ├── image-20200609201454702.png │ ├── image-20200609202600880.png │ ├── image-20200609202956676.png │ ├── image-20200610160541581.png │ ├── image-20200610161324054.png │ └── image-20200610161333645.png │ ├── week1.md │ ├── week2.md │ ├── week4.md │ └── week5.md ├── COMP90025 Parallel and Multicore Computing └── Lecture1.md ├── COMP90051-SML ├── Exams │ ├── practice_2019S2-sol.pdf │ ├── practice_2019S2.pdf │ ├── practice_2020S2.pdf │ ├── sml-2017-s2-questions.pdf │ └── sml-exam-2016-s2.pdf ├── Lectures │ ├── SML-final-revision.pdf │ ├── Week1 │ │ ├── 01.pdf │ │ ├── 01a_about_statml.pdf │ │ ├── 01b_probability_review.pdf │ │ ├── 01c_linalgebra_review.pdf │ │ ├── 01d_limits_review.pdf │ │ ├── 02.pdf │ │ ├── 02a_stat_schools_freq.pdf │ │ ├── 02b_stat_schools_dtheory.pdf │ │ └── 02c_stat_schools_bayes.pdf │ ├── Week10 │ │ ├── 19_pgms.pdf │ │ └── 20_pgm_inference.pdf │ ├── Week11 │ │ ├── 21_hmm.pdf │ │ └── 22_gmm.pdf │ ├── Week12 │ │ ├── 23_em.pdf │ │ ├── 24_bayesian_rl.pdf │ │ └── QA12.pdf │ ├── Week2 │ │ ├── 03a_lin_regression_dtheory.pdf │ │ ├── 03b_lin_regression_freq.pdf │ │ ├── 03c_basis expansion.pdf │ │ ├── 04a_iterative_optim.pdf │ │ ├── 04b_logistic_regression.pdf │ │ └── 04c_irls_algorithm.pdf │ ├── Week3 │ │ ├── 05 regularisation combined.pdf │ │ └── 06 PAC learning combined.pdf │ ├── Week4 │ │ ├── 07 VC theory combined.pdf │ │ └── 08 SVM combined.pdf │ ├── Week5 │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── 09_intro2dl.pdf │ │ ├── 10_cnn.pdf │ │ ├── __pycache__ │ │ │ └── output_size.cpython-37.pyc │ │ └── output_size.py │ ├── Week6 │ │ ├── 11_cnn-architecture.pdf │ │ └── 12_generative-model.pdf │ ├── Week7 │ │ ├── 13_tcn-rnn.pdf │ │ └── 14_GraphCNN.pdf │ ├── Week8 │ │ ├── 15_multiplicative_weights.pdf │ │ └── 16_bandits.pdf │ └── Week9 │ │ ├── 17_bayesian_regression.pdf │ │ └── 18_bayesian_classification.pdf └── Tutorials │ ├── Week10 │ ├── worksheet10.pdf │ └── worksheet10_solutions.pdf │ ├── Week11 │ ├── worksheet11a.pdf │ ├── worksheet11a_solutions.pdf │ └── workshop11-slides.pdf │ ├── Week12 │ └── workshop12-slides.pdf │ ├── Week2 │ ├── .ipynb_checkpoints │ │ └── worksheet02-checkpoint.ipynb │ └── worksheet02.ipynb │ ├── Week3 │ ├── .ipynb_checkpoints │ │ └── worksheet03-checkpoint.ipynb │ └── worksheet03.ipynb │ ├── Week4 │ ├── .ipynb_checkpoints │ │ └── worksheet04-checkpoint.ipynb │ └── worksheet04.ipynb │ ├── Week5 │ ├── .ipynb_checkpoints │ │ └── worksheet05b-checkpoint.ipynb │ ├── cats.csv │ ├── worksheet05a.pdf │ ├── worksheet05b.ipynb │ └── workshop05-slides.pdf │ └── Week6 │ ├── .ipynb_checkpoints │ └── worksheet06-checkpoint.ipynb │ └── worksheet06.ipynb ├── COMP90054-AIPA ├── Notes │ └── summary.docx └── Slides │ ├── Lectures │ ├── Week 6 - Width-based planning.pdf │ ├── Week2-Search Algorithms.pdf │ ├── Week3-Introduction to planning.pdf │ ├── Week5 - delete relxation.pdf │ ├── Week7 MDPs-value-policy-iteration.pdf │ ├── mcts.pdf │ ├── model-free-RL.pdf │ ├── pre-handout-11.pdf │ ├── pre-handout-13.pdf │ ├── problem_set_03.pdf │ └── week4-generating heuristic.pdf │ └── Tutorials │ ├── Solution1.pdf │ ├── Solution3.pdf │ ├── Solution4.pdf │ ├── Solution6.pdf │ ├── Totorial4.pdf │ ├── Tutorial1.pdf │ ├── Tutorial3.pdf │ ├── Tutorial5.pdf │ ├── Tutorial6.pdf │ ├── Tutorial7.pdf │ ├── Tutorial8.pdf │ ├── Tutorial9.pdf │ └── Week5.pdf ├── COMP90083-Computational Modelling and Simulation ├── Questions.md ├── Week1.md ├── Week2.md ├── Week3.md ├── assets │ ├── image-20200807004123849.png │ ├── image-20200807004717913.png │ ├── image-20200807004747848.png │ ├── image-20200807004807317.png │ ├── image-20200807004928310.png │ ├── image-20200807011729687.png │ ├── image-20200810163137801.png │ ├── image-20200810164929030.png │ ├── image-20200810165300118.png │ ├── image-20200813135942955.png │ ├── image-20200813195858011.png │ ├── image-20200820175420529.png │ ├── image-20200820180010222.png │ ├── image-20200820180056869.png │ ├── image-20200820180533490.png │ └── image-20201125221820892.png └── image-20200820180056869.png ├── CS ├── General questions.md ├── Week12.md ├── assets │ ├── 0F35C341-A2F3-4267-A6F8-0D93EABC9366.png │ ├── 1B68B60C-3562-4478-9441-9953CD198C65.png │ ├── 3184B04C-094C-40F5-A128-BF07032A223A.png │ ├── 6D6C419A-3A07-41B1-B812-3D2DBBAF88C8.png │ ├── image-20190319203854228.png │ ├── image-20190319211125198.png │ ├── image-20190319211133616.png │ ├── image-20190319215655007.png │ ├── image-20190326232321041.png │ ├── image-20190327000048872.png │ ├── image-20190327000130093.png │ ├── image-20190327001945778.png │ ├── image-20190327002015513.png │ ├── image-20190327142746308.png │ ├── image-20190327142912731.png │ ├── image-20190330163926424.png │ ├── image-20190330163930298.png │ ├── image-20190330165415678.png │ ├── image-20190330165920021.png │ ├── image-20190330235149980.png │ ├── image-20190330235153339.png │ ├── image-20190402224949944.png │ ├── image-20190405101144471.png │ ├── image-20190405112740616.png │ ├── image-20190405112756638.png │ ├── image-20190407111241888.png │ ├── image-20190407111257633.png │ ├── image-20190407113303510.png │ ├── image-20190410002725427.png │ ├── image-20190411002040621.png │ ├── image-20190422165301599.png │ ├── image-20190430232313639.png │ ├── image-20190430233231589.png │ ├── image-20190502205123231.png │ ├── image-20190502205126735.png │ ├── image-20190506010919569.png │ ├── image-20190506011602650.png │ ├── image-20190507105247712.png │ ├── image-20190507105249249.png │ ├── image-20190507105250809.png │ ├── image-20190507105558021.png │ ├── image-20190509140004546.png │ ├── image-20190512202044485.png │ ├── image-20190512204718126.png │ ├── image-20190512210323574.png │ ├── image-20190516113442275.png │ ├── image-20190605105211602.png │ ├── image-20190605105221830.png │ ├── image-20190605113135125.png │ ├── image-20190605113142422.png │ ├── image-20190605113150185.png │ ├── image-20190605125415973.png │ ├── image-20190605132843742.png │ ├── image-20190605153523166.png │ ├── image-20190605153533311.png │ ├── image-20190605230136412.png │ ├── image-20190605232436409.png │ ├── image-20190606104920175.png │ ├── image-20190606190248093.png │ ├── image-20190611213547244.png │ └── image-20190611213615960.png ├── week1.md ├── week10.md ├── week11.md ├── week2.md ├── week3.md ├── week4.md ├── week5.md ├── week7.md ├── week8.md └── week9.md ├── DOA_EXTENTION └── README.md ├── EODP ├── 2016.md ├── 2017.md └── README.md ├── LICENSE ├── ML ├── assets │ ├── FF057575-BF1B-44D4-86EF-D180A001F9CA.png │ ├── image-20190319000158230.png │ ├── image-20190325222555379.png │ ├── image-20190325222816765.png │ ├── image-20190325222914628.png │ ├── image-20190409153342377.png │ ├── image-20190614143328773.png │ ├── image-20190614145621704.png │ ├── image-20190614180000891.png │ ├── image-20190614180016897.png │ ├── image-20190614231111970.png │ ├── image-20190614234204923.png │ ├── image-20190615154242603.png │ ├── image-20190615155937957.png │ ├── image-20190615164524229.png │ ├── image-20190615170105809.png │ ├── image-20190616125346785.png │ ├── image-20190616182727806.png │ ├── image-20190616183252663.png │ ├── image-20190616185026505.png │ ├── image-20190616185226462.png │ ├── image-20190616185336007.png │ └── image-20190616192949382.png ├── newton.py ├── week1.md ├── week10.md ├── week11.md ├── week2.md ├── week3.md ├── week4.md ├── week5.md ├── week6.md ├── week7.md ├── week8.md └── week9.md ├── Machine Learning — Coursera ├── README.md └── assets │ ├── gif.latex │ ├── image-20190707125915022.png │ ├── image-20190707140422585.png │ ├── image-20190707160613809.png │ ├── image-20190707160949466.png │ ├── image-20190707231553907.png │ └── image-20190709115511594.png ├── OOSD ├── 2017.md └── README.md ├── README.md └── assets └── image-20190409142940855.png /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | \.DS_Store 3 | -------------------------------------------------------------------------------- /AI/assets/image-20190319191526000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190319191526000.png -------------------------------------------------------------------------------- /AI/assets/image-20190319191528911.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190319191528911.png -------------------------------------------------------------------------------- /AI/assets/image-20190319200352056.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190319200352056.png -------------------------------------------------------------------------------- /AI/assets/image-20190326164402568.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190326164402568.png -------------------------------------------------------------------------------- /AI/assets/image-20190329192304896.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190329192304896.png -------------------------------------------------------------------------------- /AI/assets/image-20190413170900279.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190413170900279.png -------------------------------------------------------------------------------- /AI/assets/image-20190413170902859.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190413170902859.png -------------------------------------------------------------------------------- /AI/assets/image-20190413171503222.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190413171503222.png -------------------------------------------------------------------------------- /AI/assets/image-20190413180302784.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190413180302784.png -------------------------------------------------------------------------------- /AI/assets/image-20190413180850355.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190413180850355.png -------------------------------------------------------------------------------- /AI/assets/image-20190619102459841.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619102459841.png -------------------------------------------------------------------------------- /AI/assets/image-20190619112916296.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619112916296.png -------------------------------------------------------------------------------- /AI/assets/image-20190619113007408.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619113007408.png -------------------------------------------------------------------------------- /AI/assets/image-20190619113028741.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619113028741.png -------------------------------------------------------------------------------- /AI/assets/image-20190619125222634.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619125222634.png -------------------------------------------------------------------------------- /AI/assets/image-20190619161618966.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619161618966.png -------------------------------------------------------------------------------- /AI/assets/image-20190619170941427.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190619170941427.png -------------------------------------------------------------------------------- /AI/assets/image-20190621145138525.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621145138525.png -------------------------------------------------------------------------------- /AI/assets/image-20190621221706911.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621221706911.png -------------------------------------------------------------------------------- /AI/assets/image-20190621222320051.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621222320051.png -------------------------------------------------------------------------------- /AI/assets/image-20190621222346716.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621222346716.png -------------------------------------------------------------------------------- /AI/assets/image-20190621230616254.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621230616254.png -------------------------------------------------------------------------------- /AI/assets/image-20190621231259631.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621231259631.png -------------------------------------------------------------------------------- /AI/assets/image-20190621231332372.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621231332372.png -------------------------------------------------------------------------------- /AI/assets/image-20190621232217585.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621232217585.png -------------------------------------------------------------------------------- /AI/assets/image-20190621234315572.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190621234315572.png -------------------------------------------------------------------------------- /AI/assets/image-20190622000823887.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190622000823887.png -------------------------------------------------------------------------------- /AI/assets/image-20190622001731534.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190622001731534.png -------------------------------------------------------------------------------- /AI/assets/image-20190622002114723.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190622002114723.png -------------------------------------------------------------------------------- /AI/assets/image-20190622002136247.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/AI/assets/image-20190622002136247.png -------------------------------------------------------------------------------- /AI/week10.md: -------------------------------------------------------------------------------- 1 | ### Bayesian Network 2 | 3 | - A **simple**, **graphical notation** for conditional independence assertions and hence for **compact specification of full joint distribution** 4 | - Example 5 | - ![image-20190621230616254](assets/image-20190621230616254.png) 6 | - Compactness 7 | - Growth linear with n $O(n*2^k)$, where $k$ is the number of comparing to $O(2^n)$ for the full joint distribution. 8 | - Global Semantics 9 | - Full joint distribution as product of the local conditional distributions 10 | - ![image-20190621231259631](assets/image-20190621231259631.png) 11 | - Given the graph 12 | - ![image-20190621231332372](assets/image-20190621231332372.png) 13 | 14 | - Local Semantics 15 | - Each node is conditionally independent of its non-descendants given its parents 16 | - Constructing Bayesian Networks 17 | - ![image-20190621232217585](assets/image-20190621232217585.png) 18 | 19 | 20 | 21 | ### Inference Task 22 | 23 | - Simple queries — Computer posterior marginal $P(X_I|E=e)$ 24 | 25 | - $P(NoGas|Gauge=empty,Lights=on, starts=false)$ 26 | 27 | - Conjuncive queries 28 | 29 | - $P(X_i,X_j|E=e) = P(X_i|E=e)P(X_j|X_i,E=e)$ 30 | 31 | -------------------------------------------------------------------------------- /AI/week11.md: -------------------------------------------------------------------------------- 1 | ### Robotics 2 | 3 | - Holonomic 4 | - 6 degrees of freedom 5 | - ![image-20190621234315572](assets/image-20190621234315572.png) 6 | - Where 6 is also the minimum number required to position end-effector arbitrarily 7 | - Non-holonomic 8 | - Car has more DOF (3) than controls (2) 9 | - Two major sources of uncertainty 10 | - Percepts 11 | - Actions 12 | 13 | 14 | 15 | ### Localization and Mapping 16 | 17 | - Localization 18 | - Given **map** and **observed landmarks**, update position distribution 19 | - Sensor model 20 | - Use observation $h(x_t)$ of landmark $x_i,y_i$ to estimate state $x_t$ of robot 21 | - Motion Model 22 | - Update states using its movements $v_t \triangle_t$ and $\mathcal{w}_t\triangle_t$ 23 | - Can use particle filtering to produce approximate position estimate, starting with random samples from uniform prior distribution for robot position. Update likelihood of each sample using sensor measurements. Resample according to the updated likelihood. 24 | - Uncertainty of the robot's state grows as it moves until we find a landmark 25 | - Assume that landmarks are identifiable 26 | 27 | - Mapping 28 | - Given **position** and **observed landmarks**, update map distribution 29 | - Simultaneous Localization and Mapping (SLAM) 30 | - Given observed landmarks, update both pose and map distribution 31 | - Probabilistic formulation 32 | - Add landmark locations $L_1,…L_k$ to the state vector, proceed as for localization 33 | 34 | 35 | 36 | 37 | 38 | ### Bayesian Inference on Sensors 39 | 40 | - To determine whether an obstacle is there, given multiple measurements from a sensor 41 | - Bayes Law in incremental form / Bayesian update rule 42 | - ![image-20190622000823887](assets/image-20190622000823887.png) 43 | 44 | 45 | 46 | 47 | 48 | ### Motion Planning 49 | 50 | - Cell decomposition 51 | - Divide up space into simple cells 52 | - Each of which can be traversed “easily” 53 | - ![image-20190622001731534](assets/image-20190622001731534.png) 54 | - Problems 55 | - Some path disappear 56 | - Solution 57 | - Recursive decomposition of mixed cells 58 | - Skeletonization 59 | - Identify finite number of easily connected points/lines that form a graph such that any two points are connected by a path on the graph 60 | - Voronoi diagram 61 | - Locus of points equidistant from obstacles 62 | - Problem 63 | - Doesn't scale well to higher dimensions 64 | - Solution 65 | - A probabilistic roadmap is generated by generating random points in C-space and keeping those in free space, create graph by joining pairs by straight lines 66 | - Problem 67 | - Need to generate enough points to ensure that every start/goal pair is connected through the graph 68 | - ![image-20190622002114723](assets/image-20190622002114723.png) -------------------------------------------------------------------------------- /AI/week2.md: -------------------------------------------------------------------------------- 1 | ### Problem Solving Agents 2 | 3 | - Online 4 | 5 | - You have to explore the environment while make decision 6 | 7 | - Offline 8 | 9 | - More like a search problem where you have the information of the environment and rule of the environment 10 | 11 | - Evaluate problems from 12 | 13 | - states 14 | - actions 15 | - Goal test 16 | - Path cost 17 | 18 | 19 | 20 | ### Uninformative Search 21 | 22 | - Evaluate using 23 | - Completeness 24 | - Does it always find a solution if one exist 25 | - Time complexity 26 | - Number of nodes generated/expanded 27 | - Space complexity 28 | - Maximum number of nodes in memory 29 | - Optimality 30 | - Does it always find a lest-cost solution 31 | - Parameters 32 | - b 33 | - Maximum branching factor of the search tree 34 | - d 35 | - Depth of the least-cost solution (goal) 36 | - m 37 | - Maximum depth of the state space (may be $\infty$) 38 | - $\epsilon $ 39 | - A arbitrary positive integer 40 | - BFS (Uniform-cost search with all cost = 1) 41 | - Time 42 | - $1+b^2+b^3+…+b^d = O(b^d)$ 43 | - Exponential growth in d 44 | - space 45 | - $O(b^d )$ 46 | - keeps every node in memory 47 | - Uniform-cost search (general form for BFS) 48 | - Optimality 49 | - Yes, since will always expand the less cost node first 50 | - Time and space 51 | - We only need to store those point that has the overall cost smaller than destination 52 | - Where is # of nodes with g $\leq$ cost of optimal solution. 53 | - DFS 54 | - Completeness 55 | - No, may fails in infinite-depth spaces, spaces with loops modify to avoid repeated states along path. 56 | - Time 57 | - $O(b^m)$ 58 | - Terrible if m is much larger than d but if solutions are dense, might be much faster than BFS. 59 | - Space 60 | - $O(bm)$ 61 | - Linear space 62 | - Optimal 63 | - No, may expand non-optimal solution first. 64 | - DLS (Depth-limited search) 65 | - Restrict the maximum depth that could explore by DFS 66 | - Will complete only if $l \geq d \ \text{where } l \ \text{is the limited depth}$ 67 | - IDS (Iteratively Deepening Search) 68 | - Time 69 | - $(d+1)b^0+db^1+(d-1)b^2+…+b^d=O(b^d)$ 70 | - (d+1) is the root 71 | - Space 72 | - $O(bd)$ 73 | - Optimality 74 | - ==Only if the step cost are 1 (identical)== 75 | - Why this? 76 | - ![image-20190619125222634](assets/image-20190619125222634.png) -------------------------------------------------------------------------------- /AI/week3.md: -------------------------------------------------------------------------------- 1 | ### Best-First Search 2 | 3 | - Use **evaluation function** for each node to estimate desirability 4 | 5 | - Might be a straight-line distance from current node to the goal 6 | - Properties 7 | - Completeness 8 | 9 | - No, can get stuck in a loop, since the heuristic function may not reflect the real cost. 10 | - Times 11 | 12 | - $O(b^m)$ For the worst time, but a good heuristic can give dramatic improvement 13 | - Space 14 | 15 | - $O(b^m)$, it keeps all nodes in memory 16 | - Optimal 17 | 18 | - No 19 | 20 | 21 | 22 | ### A\* 23 | 24 | - Evaluation function 25 | 26 | - $f(n) = g(n) + h(n)$, where 27 | - $g(n) = $ cost os far to reach n (path cost) 28 | - $h(n)=$ Estimated cost to goal from $n$ 29 | - $f(n) =$ Estimated total cost of path through $n$ to goal 30 | 31 | - Optimality (those two conditions are sufficient but unnecessary condition) 32 | 33 | - Admissible (**tree** and **graph**) 34 | 35 | - $\forall n, h(n) \leq h^*(n), $ where $h^*$ is the actual cost. 36 | 37 | - Suppose we have a map like this 38 | 39 | ![image-20190319191528911](assets/image-20190319191528911.png) 40 | 41 | - Note that G is the real goal we want, G' is another worse goal, n is any node between the starting point and G 42 | 43 | - If we prove that give $0 \leq h(n) \leq h^*(n)$ , n is always expanded before G', by the mathematically induction, we can say that G will be expanded before G’ 44 | 45 | - So we have $0 \leq h(G) \leq h^*(G) = 0 \implies h(G) = 0$ , since from goal to goal cost nothing in the perfect heuristic function 46 | 47 | - Therefore, $h(G') = 0$, since G' is another goal 48 | 49 | - We need to prove $f(G') > f(n)$ 50 | 51 | - $f(G') \\= g(G') + h(G') \\= g(G')\\ > g(G) \\= g(n) + h^*(n)\\ \geq g(n) + h(n) \\ =f(n)$ 52 | 53 | - Therefore, we can conclude that $f(G') \geq f(n)$ 54 | 55 | - Consistency (only **graph**) aka. Monotonic (triangle inequality) 56 | 57 | - $\forall\ $successor n' of any n generated by any action a where c is the moving cost, which is $h(n) \leq c(n,a,n') + h(n')$ 58 | - Lemma : If h(n) is consistent, the values of $f$ along any path in $A^*$ are non-decreasing 59 | - ![image-20190319200352056](assets/image-20190319200352056.png) 60 | - Which is same to proof $f(n') \geq f(n)$ 61 | - Given $c(n,a,n') + h(n') \geq h(n)$ 62 | - $f(n') \\=g(n') + h(n') \\ = g(n) + c(n,a,n') + h(n') \\\geq g(n) + h(n )\\=f(n) $ 63 | 64 | - Completeness 65 | 66 | - Yes, unless there are infinitely many nodes with $f \leq f(G)$ 67 | 68 | - Space Complexity 69 | 70 | - $O(b^d)$ 71 | - Keeps all node in memory 72 | 73 | - Time complexity 74 | 75 | - $O(b^{\epsilon d})$ , $\epsilon$ is the relative error can be calculated in $(h^* - h)/h^*$ 76 | 77 | 78 | 79 | ### Dominance of heuristic 80 | 81 | - If $\forall n\ h_1(n) \geq h_2(n)$ , both of them are admissible, then we said $h_1$ is dominate $h_2$ , using $h1$ may give us a better time complexity 82 | 83 | 84 | 85 | ### How to come up with heuristic function? 86 | 87 | - Relaxed problems 88 | 89 | - Admissible heuristics can be derived from the relaxed version of the problem 90 | - Finding informative features 91 | - Finding which features help us faster approaching our goal 92 | - Using ML to find hyper-parameters 93 | - Learning from experience 94 | - When finishing a game, then look back to see how we can improve 95 | - Normally using a utility function 96 | - Reinforcement learning 97 | 98 | 99 | 100 | ### Iterative Improvement algorithms 101 | 102 | - Sometimes we don't care about the path, we are only interesting in the goal state itself 103 | - Each state is a set of **configurations**, we are willing to find optimal configuration 104 | - Travelling salesperson problem 105 | - Find configuration satisfying constraints 106 | - N-queens problem 107 | - Only keeping the current state and try to improve it 108 | - Constant space, suitable for online as well as offline search 109 | - Hill climbing search (gradient ascent/descent) 110 | - Keep searching for the larger successor, if there is no such successor, then we return the current node. 111 | - But this algorithm might stuck at local maximal -------------------------------------------------------------------------------- /AI/week4.md: -------------------------------------------------------------------------------- 1 | ### Real World Game 2 | 3 | - It has lots of limitations 4 | - Unpredictable opponent 5 | - Time Limitations 6 | - Unlikely to find a goal, must approximate 7 | - Some of the game are only have **imperfect information**, and depends on **chance** 8 | - Poker (cannot see the card of our opponents) 9 | - Bridge 10 | - Nuclear war 11 | - Some of the game are **deterministic but with imperfect information** 12 | - battleship 13 | 14 | 15 | 16 | ### Representing a game as a search problem 17 | 18 | - Need to consider 19 | - Initial state 20 | - How do we start the game 21 | - Actions 22 | - How can one player move in the environment 23 | - Termial test 24 | - Win condition 25 | - Lose condition 26 | - Draw condition 27 | - Utility function (numeric reward for outcome) 28 | - Chess: +1,0,-1 29 | - Poker: cash won or lost 30 | 31 | - Method 32 | - Minimax 33 | - Assumption 34 | - Our opponent is rational and won't let us always do the best decision. 35 | - **Perfect play** in **deterministic ,perfect-information** games 36 | - Maximise the minimal value in successor (chose A1) 37 | - ![image-20190326164402568](assets/image-20190326164402568.png) 38 | - Properties 39 | - Completeness 40 | - Yes, if the tree is finite 41 | - Optimality 42 | - Yes, if against an optimal opponent 43 | - Otherwise, no 44 | - Time complexity 45 | - $O(b^m)$ 46 | - Space complexity (DFS exploration) 47 | - $O(bm)$ 48 | - Resource limits 49 | - Cutoff Test 50 | - Depth Limit 51 | - Quiescence Search 52 | - If only small improvement, we stop, otherwise keep searching deeper 53 | - Evaluation Function 54 | - Estimated desirability of positions 55 | - Like alphaZero using residual-CNN to estimate how likely we are going to move to that state 56 | - **Typically** linear weighted sum of features depends on how important they are 57 | - $eval(s) = w_1f_1(s) + w_2f_2(s) + … + w_nf_n(s)$ 58 | - Minimax cutoff 59 | - A cutoff strategy of when we stop stop the minimax searching 60 | - Replace 61 | - terminal state by cutoff 62 | - We can terminate the search when there is no significant changes 63 | - Utility by eval 64 | 65 | - How to make search quicker? ($\alpha-\beta$ pruning) 66 | 67 | - Prune part of the tree without exploring them 68 | - Key point is we can remove a branch if we find a better results 69 | - ![image-20190329192304896](assets/image-20190329192304896.png) 70 | - In this case, the final results won't be affected. 71 | - With perfect ordering, Time complexity = $O(b^{\frac{m}{2}})$ 72 | - We can now doubles depth of search 73 | - How? 74 | - Using iteratively deepening 75 | - Using heuristic to search the better node first 76 | - Improvement 77 | - Utility of a node expansion , which we tend to expand the node which is higher in utility results, hopefully it may lead us to a better decision. 78 | - A extension on those abilities would be using goal-directed reasoning 79 | 80 | 81 | 82 | ### Non-deterministic Game 83 | 84 | - Which path to take depends on chance 85 | - Expectation Minimax 86 | - Also gives **perfect play** 87 | - ![image-20190619161618966](assets/image-20190619161618966.png) 88 | - We have to handle the all the expectations, therefore, $\alpha-\beta$ pruning does not so well. -------------------------------------------------------------------------------- /AI/week5.md: -------------------------------------------------------------------------------- 1 | ### Learning Strategy 2 | 3 | - Book Learning 4 | - Learn sequence of moves for important positions 5 | - Problem 6 | - How do we recognise which moves were important? 7 | - Search Control Learning 8 | - Learn how to make search more efficient 9 | - Since, 10 | - Order of move generation affects $\alpha - \beta$ pruning 11 | - Learn a classifier to predict what depth we should search to based on current states. 12 | - Gradient descent Learning 13 | - Eval(s) = $wf(s) $ 14 | - Update using gradient descent 15 | - $w_i \leftarrow w_i - \frac{\partial E}{\partial w_i}$ 16 | - Use the MSE to measure the error 17 | - Error = $\frac{1}{2}\sum(t-z)^2$ 18 | - Where $z$ is Eval(s) and $t$ is desired output 19 | - Combine the error function 20 | - $\frac{\partial E}{\partial w_i} = \frac{\partial[\frac{1}{2}(t-z)^2]}{\partial z} \frac{\partial z}{\partial w_i}\\ \ \ \ \ \ \ =(z-t)\frac{\partial z}{\partial w_i}\\ \ \ \ \ \ \ = (z - t)f_i(s)$ 21 | - We normally add a learning rate when updating the parameters 22 | - $w_i \leftarrow w_i - \eta(z-t)f_i(s)$ 23 | 24 | 25 | 26 | ### Reward Assignment 27 | 28 | - Problems 29 | - Delayed reinforcement 30 | - Reward resulting from an action may not be received until several time steps later, which also slows down the learning 31 | - Credit assignment 32 | - Need to know which actions was responsible for the outcome 33 | - TD (Temporal Difference Learning) — reinforcement learning algorithm 34 | - TD learning is for multi-step prediction 35 | - Correctness of prediction not known until several steps later 36 | - Intermediate steps provide information about correctness of prediction 37 | - Basic idea 38 | - Update weight in evaluation function to reduce differences in rewards predicted at different levels in search tree. 39 | - TDLeaf($\lambda$) 40 | - Parameters 41 | - eval(s, w) 42 | - Evaluation function for state s with parameters $w = [w_1,..,w_k]$ 43 | - $s_1,…,s_N$ 44 | - The N states that occurred during a game 45 | - $r(s_N)$ 46 | - Reward based on outcome of game ${+1, 0, -1}$ 47 | - $s^l_i$ 48 | - Best leaf found at max cut-off depth using minimax search starting at state $s_i$ 49 | - We can convert an evaluation score into a reward using 50 | - $r(s^l_i, w) = tanh(eval(s^l_i,w))$ 51 | - Where tanh squashes the evaluation score into the range [-1,1] 52 | - For $i = 1,…,N-1$ 53 | - Compute temporal difference between successive states 54 | - $d_i = r(s^l_{i+1}, w) - r(s^l_i,w)$ 55 | - Then update each weight accordingly with learning rate $\eta$ 56 | - $w_j \leftarrow w_j + \eta\sum\limits^{N-1}_{i=1}\frac{\part r(s^l_i,w)}{\part w_j}[\sum\limits^{N-1}_{m=i}\lambda^{m-i}d_m]$ 57 | 58 | - $\lambda$ Control the the how far the influence of a action propagate 59 | - $\lambda = 1$ Look towards the final true reward 60 | - $\lambda = 0$ Look towards the next move -------------------------------------------------------------------------------- /AI/week6.md: -------------------------------------------------------------------------------- 1 | ### CSP (Constraint Satisfaction Problems) 2 | 3 | - Definition 4 | - State 5 | - Defined by *variable* $X_i$ with values from *domain* $D_i$ 6 | - Goal test 7 | - Set of constrains specifying allowable combinations of values for subsets of variables 8 | - Question type 9 | - Binary CSP 10 | - Each constraint relates at most two variables 11 | - Constraint graph 12 | - Nodes are variables, arcs show constrains 13 | - ![image-20190621145138525](assets/image-20190621145138525.png) 14 | - Variable type 15 | - Discrete variables 16 | - Finite domains, size d $\to$ $O(d^n)$ complete assignments, where n is the variable 17 | - e.g. 18 | - Boolean CSPs, including boolean satisfiability (NP-Complete) 19 | - Job scheduling, variables are start/end days for each job 20 | - Linear constrains solvable, non-linear undecidable 21 | - Continuous variables 22 | - Start/end times for Hubble Telescope observations 23 | - Linear constrains solvable in polynomial time by linear programming (LP) 24 | 25 | 26 | 27 | ### Standard Search Formulation (Incremental) 28 | 29 | - $b= (n-l)d$ at depth $l$, hence $n!d^n$ level 30 | 31 | 32 | 33 | ### Backtracking Search 34 | 35 | - Equal to DFS for with one variable assigned per node 36 | - $b = d$ and there are $d^n$ leaves 37 | - How to speed up the backtrace search 38 | - Minimum remaining values (MRV) 39 | - Choose the variable with the **fewest legal values** 40 | - Use degree heuristic (can act like a tie-breaker) 41 | - Choose the variable with the most constraints on remaining variables. 42 | - Variable ordering and value selection help significantly 43 | - Least constraining value 44 | - Choose the one that will remain us more options 45 | - Forward checking 46 | 47 | - Keep track of how many possible solution left for each state 48 | - ![image-20190413170902859](assets/image-20190413170902859.png) 49 | - ![image-20190413171503222](assets/image-20190413171503222.png) 50 | - SA and NT are neighbor but left same color 51 | - We need to propagate our choice further instead of only their neighbors 52 | - To prevent later failure 53 | - Constraint propagation 54 | 55 | - **Arc Consistency** 56 | - X $\to$ Y is arc consistent iff for each of them at least have one value that satisfies the constraint between X and Y 57 | - If X loses a value, neighbors of X need to be rechecked. 58 | - ![image-20190413180302784](assets/image-20190413180302784.png) 59 | - Remove the condition that could not be satisfy 60 | - $O(n^2d^3)$ can be reduced to $O(n^2d^2)$ 61 | - But detecting all is NP-hard 62 | - Too slow, what to do? 63 | 64 | - Split into connected component, reduce time complexity dramatically 65 | 66 | - Turn graph to tree 67 | 68 | - Use topological sort and then start the AC(arc consistency) check from the bottom node and its parent(s) 69 | - Can be solved in $O(nd^2)$ 70 | - Actually are $O(d^c (n-c)d^2)$ 71 | - Very fast for small c 72 | - How to form a tree from a graph? 73 | - Cut-set conditioning 74 | - Initiate a point and cut it from the graph, then we can get a tree 75 | - ![image-20190413180850355](assets/image-20190413180850355.png) 76 | - But find the minimal set of point is a NP-hard problem 77 | - Local Search 78 | 79 | - Using hill-climbing and min-conflicts heuristic which make selection with the least number of violation 80 | - Tries to change one variable assignment at a time. 81 | - Really fast, can solve n-queen problem in linear time -------------------------------------------------------------------------------- /AI/week8.md: -------------------------------------------------------------------------------- 1 | ## Auction 2 | 3 | - Multi-agent systems 4 | 5 | - Mechanism design 6 | 7 | - How to design a game that results in maximizing a global utility function in a multi-agent system, given that each agent pursues their own rational strategy 8 | - We focusing on auction, which consists of three main components 9 | - A **language to describe** the allowable strategies an agent can follow 10 | - A **protocol for communicating bids** from bidder to the auctioneer, and 11 | - An **outcome rule**, used by the auctioneer to determine the outcome 12 | 13 | 14 | 15 | ### Dimensions of auction protocols 16 | 17 | - Winner determination — which bidder wins, and what do they pay? 18 | - First-price auctions 19 | - Bidder with highest bid is allocated the good 20 | - Second-price auctions 21 | - Bidder with highest bid wins but pays the auctioneer the price of the second highest bidder. 22 | - Knowledge of bis — who can see the bids? 23 | - Open-cry 24 | - Every bidder can see all bids from all other bidders 25 | - Sealed-bid 26 | - Bidder can see it own bids, not those of other bidders 27 | - Order of bids — in what order can bids be made? 28 | - One-shot 29 | - Each bidder can make only one bid 30 | - Ascending 31 | - Each successive bid must exceed the previous bid 32 | - Descending 33 | - Auctioneer starts from a high price, and each bid must be lower than the previous bid. 34 | - Number of goods — how many goods are for sale? 35 | - Single good 36 | - Many goods 37 | - Combinatorial auction 38 | - We focusing on single good! 39 | 40 | 41 | 42 | ### Value that Affecting Mechanism Design 43 | 44 | - Common Value 45 | - The worth of the good is the same for all bidders, but that worth is unknown and must be estimated by each bidder. 46 | - e.g. an ounce of gold 47 | - Private Value 48 | - Each bidder has a utility value that reflects the worth of the good to the bidder 49 | - A golden earring 50 | 51 | 52 | 53 | ### Desirable Properties 54 | 55 | - Efficient 56 | - The goods go to the agent who values them the most 57 | - Discourage collusion 58 | - The auction mechanism should discourage illegal or unfair agreements between two or more bidders to manipulate prices 59 | - Dominant strategy 60 | - There exists a dominant strategy for bidders, where a strategy is dominant if it gives the bidder a better pay-off than any other strategy 61 | - Truth-revealing 62 | - The dominant strategy results in bidder revealing their true value for the good 63 | 64 | 65 | 66 | 67 | 68 | ### Type of Auction 69 | 70 | - English auction (ascending-bid) 71 | - First-price, open-cry, ascending 72 | - Properties 73 | - There is a **dominant strategy** 74 | - Bid higher than others, but smaller than your value 75 | - Efficient 76 | - Too high 77 | - Bidder who values good may not bid 78 | - Too low 79 | - Seller may lose revenue 80 | - Susceptible to collusion 81 | - Winner's curse 82 | - Dutch auction (descending-bid) 83 | - Open-cry, descending 84 | - Properties 85 | - Similar problem as English auction 86 | - First-price sealed-bid auction (FPSB) 87 | - Properties 88 | - **No** dominant strategy 89 | - Bid less that your true value, but how much less depends on other agents' bid 90 | - May not be **efficient** 91 | - Make it hard for collusion 92 | - Much simpler 93 | - Vickrey Auction (SPSB) 94 | - Price paid by winner is the price of second-highest bid 95 | - Properties 96 | - Efficient 97 | - Truth-revealing 98 | - Overcome the winner's curse 99 | - Harder for collusion 100 | - A bit counter-intuitive for human bidders 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /AI/week9.md: -------------------------------------------------------------------------------- 1 | ### Uncertainty 2 | 3 | - How 4 | 5 | - Partial observability 6 | - Road state 7 | - Ohter drivers' plans 8 | - Noisy sensors 9 | - Radio traffic reports 10 | - Uncertainty in action outcomes 11 | - Flat tyre 12 | - Immense complexity of modelling and predicting traffic 13 | 14 | 15 | 16 | ### Inference by enumeration 17 | 18 | - Use hidden variable 19 | 20 | - ![image-20190621221706911](assets/image-20190621221706911.png) 21 | 22 | - Problem 23 | 24 | - Worst case time complexity $O(d^n)$ where d is the largest arity 25 | - Space complexity $O(d^n)$ to store the joint distribution 26 | - Independent entry number are calculated by $2^n -1$ 27 | 28 | - Solution — conditional probability 29 | 30 | - ![image-20190621222320051](assets/image-20190621222320051.png) 31 | 32 | 33 | - Therefore, we could have 34 | - ![image-20190621222346716](assets/image-20190621222346716.png) -------------------------------------------------------------------------------- /COMP90015 DS/Note/Week1.md: -------------------------------------------------------------------------------- 1 | # Week 1 & 2 Introduction 2 | 3 | ### Defining Distributed Systems 4 | 5 | - 6 | 7 | -------------------------------------------------------------------------------- /COMP90020 DA/Consensus.md: -------------------------------------------------------------------------------- 1 | # Consensus 2 | 3 | ## What is? 4 | 5 | - Short 6 | - Agreement on a value or action to be taken 7 | - Long 8 | - We have N process 9 | - They can reliably communicate 10 | - Each process p have two states 11 | - Initial or undecided 12 | - Decided 13 | - Design a protocol that at the end 14 | - All (correct) process set their decision to the same value 15 | - Only set once 16 | 17 | 18 | 19 | ## Application 20 | 21 | - Proof of work in block chain 22 | - Keep a local list of know-others in a distributed environment 23 | - Receiving same updates in the same order 24 | - Mutual exclusive access to resources 25 | 26 | 27 | 28 | ## Properties 29 | 30 | - Terminate 31 | - Eventually each correct process sets its decision variable 32 | - Agreement 33 | - The decision value of all correct processes is the same 34 | - If $p_i$ and $p_j$ are correct and have entered the decided state, then $d_i = d_j \ (i,j=1,2,..,N)$ 35 | - Integrity 36 | - If the correct processes all proposed the same value, 37 | - then any correct process in the decided state has chosen that value 38 | 39 | 40 | 41 | ## Three Problems 42 | 43 | ### Consensus 44 | 45 | - Discussed above 46 | 47 | 48 | 49 | ### Byzantine generals 50 | 51 | - Hardness (integrity) 52 | - If the commander is correct, then all correct processes decide on the value that the commander proposed 53 | - However, the commander may not be correct 54 | - To solve this without any authentication technique (digital signature) 55 | - If $m$ is number of failure process 56 | - We need at least $3m$ correct process to reach consensus 57 | - In total $3m + 1$ 58 | 59 | 60 | 61 | ### Interactive consistency (IC) 62 | 63 | - Goal 64 | - All correct processes agree on a vector of values 65 | - Each component corresponding to one process’ agreed value 66 | - Properties 67 | - Agreement 68 | - The decision vector of all correct processes is the same 69 | - Integrity 70 | - If $p_i$ is correct, then all correct processes decide on $v_i$ as the i-th component of their vector 71 | 72 | 73 | 74 | > It is possible to construct solutions out of the solutions to other problems among these three 75 | 76 | 77 | 78 | 79 | 80 | ## Consensus in a synchronous system 81 | 82 | - We have 83 | - Upper bound on send and receive 84 | - As in a synchronous system 85 | - Maximum crashes $f$ 86 | - Can reach consensus in $f+1$ round 87 | - Algorithm 88 | - ![image-20200630155113214](assets/image-20200630155113214.png) 89 | - Set empty value set for 0 iteration, and put its own value in the 1 iteration 90 | - For each round (starting from 1 to $f+1$) 91 | 1. B-Multicast all the value in the current iteration value set but **NOT** in last iteration value set 92 | 2. NextValueSet = current value set 93 | 3. For any received B-multicast message from other process, put it in the NextValueSet 94 | - This multicast mechanism follows the R-multicast, as 95 | - Every received value has been multicasted 96 | - Why $f+1$? 97 | - If the server crash before sending out any message, that’s fine since its own value will not get involved in the final decision. 98 | - Therefore, we should consider the case the the message only send its message to its next one (using the above algorithm) 99 | - Say, p1 send values to p2 and crashed before sending its value to anyone else, and p2 sends values to p3 and crashed, etc. 100 | - In round $f+1$, as we assume at most $f$ crashes 101 | - The $p_{f+1}$ will received the value from a crashed machine $p_f$, including all the previously crashed value 102 | - In this case, we could agree on one value even if that value belongs to previous crashed one 103 | 104 | - Proof 105 | - Use proof by contradiction 106 | - Use the concept of 107 | - If we have more crash, 108 | - it will result in different values between some correct process -------------------------------------------------------------------------------- /COMP90020 DA/Election.md: -------------------------------------------------------------------------------- 1 | # Election 2 | 3 | ## Definition 4 | 5 | - Choosing a unique process to play the role of leader and undertake special tasks 6 | - Example 7 | - Berkeley algorithm 8 | 9 |   10 | 11 | ## Fundamental 12 | 13 | - Any process can call for an election 14 | - A process can call for at most one election at a time 15 | - The result of an election does not depend on which process calls for it 16 | - Elected process should be unique 17 | - Multiple processes are allowed to call an election simultaneously 18 | - All of them together must yield only a single leader 19 | - Processes have unique identifiers 20 | - At any point in time, a process is 21 | - A participant 22 | - Engaged in some run of the election algorithm 23 | - A non-participant 24 | - Not currently engaged in any election 25 | 26 | 27 | 28 | ## Requirements 29 | 30 | - E1 (Safety) 31 | - A participant process $p_i$ has $elected_i= \bot$ or $elected_i = P$ for some non-crashed process $P$ that will be chosen at the end of the run with the largest identifier. 32 | - E2 (Liveness) 33 | - All non-crashed processes $p_i$ participate and will eventually set $elected_i \ne \bot$ 34 | 35 | 36 | 37 | ## Performance 38 | 39 | - Bandwidth utilization 40 | - Proportional to total number of messages sent 41 | - Turnaround 42 | - Number of serialized message transmission times between initiation and termination of a single run 43 | 44 | 45 | 46 | ## Ring-Based Election 47 | 48 | - $N$ processes are organized in a logical ring 49 | - All processes have a unique integer ID 50 | - All messages are sent clockwise around the ring 51 | - Each process $p_i$ has a communication channel to the next process in the ring, $p_{(i+1)\ mod\ N}$ 52 | - Initiation 53 | - Initially all processes marked as non-participants 54 | - Any process can start an election 55 | - Election start 56 | - A process marks itself as a participant, places its ID in an election message, and sends it clockwise to the next process. 57 | - If a message is forwarded, upon any forwarding, mark own state as participant 58 | - Algorithm 59 | - ![image-20200624144905938](assets/image-20200624144905938.png) 60 | - ![image-20200624144918380](assets/image-20200624144918380.png) 61 | 62 | - Analysis 63 | - ![image-20200624145002433](assets/image-20200624145002433.png) 64 | 65 | - Performance 66 | - ![image-20200624145306268](assets/image-20200624145306268.png) 67 | 68 | - Failure 69 | - Not tolerated 70 | - A failure detector can be used to manage crash failures 71 | - Repair the ring 72 | - Stop forwarding election message 73 | - Start new election 74 | - But failure detector are not perfect 75 | 76 | 77 | 78 | ## The Bully Algorithm 79 | 80 | ### Requirements 81 | 82 | - Synchronous sytem 83 | - Use timeout to detect failure 84 | - Reliable communication channels 85 | - Processes can crash 86 | - Other assumptions 87 | - Each process knows identifiers of all other process 88 | - Every process can communicate with every other process 89 | - Message types 90 | - Election 91 | - Announce an election 92 | - Answer 93 | - Reply to an election message 94 | - Coordinator 95 | - Announce identity of elected process 96 | 97 | 98 | 99 | ### Failure detection 100 | 101 | ![image-20200624150121470](assets/image-20200624150121470.png) 102 | 103 | 104 | 105 | ### Algorithm 106 | 107 | ![image-20200624150528381](assets/image-20200624150528381.png) 108 | 109 | ![image-20200624150534221](assets/image-20200624150534221.png) 110 | 111 | ![image-20200624150546750](assets/image-20200624150546750.png) 112 | 113 | 114 | 115 | ### Requirements 116 | 117 | ![image-20200624151858300](assets/image-20200624151858300.png) 118 | 119 | 120 | 121 | ### Performance 122 | 123 | ![image-20200624151925809](assets/image-20200624151925809.png) 124 | 125 | -------------------------------------------------------------------------------- /COMP90020 DA/Multicast.md: -------------------------------------------------------------------------------- 1 | # Multicast 2 | 3 | 4 | 5 | ## Types 6 | 7 | - Operations 8 | - X-multicast(g, m) 9 | - X-deliver(m) 10 | - X is 11 | - B 12 | - basic 13 | - R 14 | - reliable 15 | - FO 16 | - FIFO order 17 | - CO 18 | - Causal order 19 | - TO 20 | - total order 21 | - image-20200624152858858 22 | 23 | 24 | 25 | ## Basic Multicast (B-multicast) 26 | 27 | ![image-20200624152950424](assets/image-20200624152950424.png) 28 | 29 | 30 | 31 | ## Reliable Multicast (R-multicast) 32 | 33 | - Analysis 34 | - Integrity 35 | - A correct process $p$ delivers a (not corrupted) message at most once 36 | - Delivered message = Message sent by process 37 | - Validity (liveness) 38 | - If a correct process multicasts message m, then it will eventually deliver m 39 | - Agreement 40 | - If a correct process delivers a message $m$, then all other correct processes in the target group of message $m$ will also deliver message m 41 | - All or nothing 42 | - Agreement and validity together ensure overall liveness 43 | - If one process delivers a message $m$, then $m$ will eventually be delivered to all group members 44 | 45 | - Algorithm 46 | - ![image-20200624153230274](assets/image-20200624153230274.png) 47 | 48 | - Compare with B-Multicast 49 | - ![image-20200624153253236](assets/image-20200624153253236.png) 50 | 51 | 52 | 53 | ## FIFO Multicast (FO-Multicast) 54 | 55 | - We have some extra ordering message for sequence control 56 | - $S_g^p$ is # of messages sent by p to g 57 | - $R_g^q$ is # of messages delivered at p from q, for each process $q \neq p$ 58 | - Three process example 59 | - image-20200629162622577 60 | 61 | - Sending 62 | - Increment S by 1 63 | - Piggyback S with message 64 | - B-multicast it 65 | - Receiving (process $p$ received $q$ with sequence number S) 66 | - If S = $R_g^q + 1$ 67 | - Then S is the next message 68 | - FO-deliver(m) 69 | - $R_g^q = S$ 70 | - If $S > R_g^q + 1$ 71 | - Then it is not the next message 72 | - Some message must in-between 73 | - Hold the message in hold-back queue until intermediate messages have been delivered and S = $R_g^q + 1$ 74 | - Example 75 | - ![image-20200629163434571](assets/image-20200629163434571.png) 76 | 77 | 78 | 79 | ## Causal Order 80 | 81 | - Instead of a single number, each process maintains its own vector timestamp $V_i$ 82 | - $V_i[j]$ 83 | - The number of messages delivered at $p_i$ from $p_j$ 84 | - Init to 0 at the beginning 85 | - Piggyback the vector with the message when multicasting 86 | - Receiving(from $p_j$ to $p_i$) 87 | - If $p_j: V_j[j]=V_i[j]+1 \ \and\ \forall\ k\neq j\ V_j[k]\le V_i[k]$ 88 | - Then happened-before could be verified 89 | - And set $V_i[j] = V_i[j]+1$ 90 | 91 | 92 | 93 | ## Total Order 94 | 95 | - Need a extra sequencer 96 | - Procedure 97 | - B-multicast message to g and sequencer 98 | - Sequencer 99 | - Maintains a global sequence number $S_g$ (initially 0) 100 | - When a multicast message m is B-delivered to it 101 | - $S_g=S_g+1$ 102 | - image-20200629220603352 103 | - Receiving 104 | - p maintains local received sequence number $R_g$ 105 | - Message m is placed in hold back queue until 106 | - B-deliver(<“order”, m, $S_g$>) from sequencer and $R_g = S_g + 1$ 107 | - Then TO-deliver(m) and $R_g = R_g + 1$ -------------------------------------------------------------------------------- /COMP90020 DA/Transaction Recovery.md: -------------------------------------------------------------------------------- 1 | # Transaction Recovery 2 | 3 | ## Why? 4 | 5 | - To ensure 6 | - failure atomicity 7 | - Effects of transactions are atomic even when the server crashes. 8 | - durability 9 | - Objects are saved in permanent storage and will be available indefinitely thereafter 10 | - Service provides failure atomicity 11 | - Which means effects of transactions are atomic even when server crashes 12 | - To simplify 13 | - We assume all running server store their object in volatile memory 14 | - All of its committed objects are in a recovery file in permanent storage 15 | - Recovery consists of restoring the server with the latest committed versions of all of its objects from its recovery file 16 | 17 | 18 | 19 | ## Recovery manager (RM) 20 | 21 | - Tasks 22 | - To save objects in permanent storage for committed transactions 23 | - In recovery files 24 | - To restore the server’s objects after a crash 25 | - To reorganize the recovery file to improve the performance of recovery 26 | - To reclaim storage space 27 | - In the recovery files 28 | - Media failures also need to be covered, using mirrored disks or copies at a different location 29 | - Disk failures affecting the recovery file 30 | - Need another copy of the recovery file one an independent disk 31 | 32 | 33 | 34 | ### Intention list 35 | 36 | - Each server records an intentions list for each of its currently active transactions 37 | - An *intentions list* 38 | - contains a list of the object references of all the objects that are altered by the transaction 39 | - When a transaction commits, the intentions list is used to identify the objects affected 40 | - The committed version of each object is replaced by the tentative one 41 | - The new value is written to the server’s recovery file 42 | - In 2PC, when a participant says it is ready to commit, its RM must record its intentions list and its objects in the recovery file 43 | - It will be able to commit later on even if it crashes 44 | - When a client has been told a transaction has committed, the recovery files of all participating servers must show that the transaction is committed 45 | - Even if they crash between prepare to commit and commit 46 | - Entry example 47 | - ![image-20200626180045417](assets/image-20200626180045417.png) 48 | 49 | 50 | 51 | ### Logging 52 | 53 | - It contains a log of the history of all the transactions at a server 54 | 55 | - Including objects, intentions lists and transaction status 56 | - In happened order 57 | - A recent snapshot + a history of transactions after the snapshot 58 | - During normal operation the RM is called whenever a transaction prepares commits or aborts 59 | - ![image-20200626181040262](assets/image-20200626181040262.png) 60 | 61 | - Example 62 | - ![image-20200626181431381](assets/image-20200626181431381.png) 63 | - In P3 64 | - First line is status 65 | - Following by two intentional list 66 | - The last one is the pointer to the previous transaction before change 67 | 68 | - Recovery of objects 69 | 70 | - ![image-20200626181756468](assets/image-20200626181756468.png) 71 | - Uncommitted value should be ignore 72 | - Idempotent since the server may crash in the middle of recovering 73 | 74 | - Recovery of two-phase commit 75 | - ![image-20200626190716211](assets/image-20200626190716211.png) 76 | - Procedure 77 | 1. In phase 1, 78 | - when the coordinator is prepared to commit add a $prepare$ entry to its recovery file 79 | - Add another $coordinator$ entry to its recovery file 80 | - Before a participant can vote $yes$, its recovery manager records a $participant$ entry to its recovery file and adds an $uncertain$ transaction status to its recovery file as a forced write. 81 | 2. In phase 2 82 | - Adds either a $committed$ or an $aborted$ transaction status to its recovery file 83 | - This must be a forced write, which will force all the buffered message to write to the recovery files. 84 | - RM of participants add a $commit$ or $abort$ transaction status to their recovery files according to the message received from the coordinator. 85 | - When a coordinator has received a confirmation from all of its participants 86 | - Its RM adds a $done$ transaction status to its recovery file. 87 | - ![image-20200626190722793](assets/image-20200626190722793.png) 88 | - ![image-20200626190729763](assets/image-20200626190729763.png) 89 | 90 | -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620153349594.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620153349594.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620162210280.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620162210280.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620184017877.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620184017877.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620184104273.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620184104273.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620185448513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620185448513.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620185500061.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620185500061.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620185511625.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620185511625.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620203349450.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620203349450.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620205106778.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620205106778.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620224342225.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620224342225.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200620234326639.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200620234326639.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200622224402487.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200622224402487.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623120417633.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623120417633.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623120445728.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623120445728.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623120502303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623120502303.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623141635041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623141635041.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623145844041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623145844041.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623150634863.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623150634863.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623150643748.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623150643748.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623150646191.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623150646191.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623171703398.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623171703398.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623174926353.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623174926353.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623174928267.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623174928267.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623180031980.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623180031980.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623180921599.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623180921599.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623182007961.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623182007961.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623182015332.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623182015332.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623211752488.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623211752488.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623211848092.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623211848092.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200623213600412.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200623213600412.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624144905938.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624144905938.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624144918380.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624144918380.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624145002433.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624145002433.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624145306268.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624145306268.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624150121470.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624150121470.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624150528381.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624150528381.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624150534221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624150534221.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624150546750.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624150546750.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624151858300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624151858300.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624151925809.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624151925809.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624152858858.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624152858858.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624152950424.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624152950424.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624153054109.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624153054109.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624153119943.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624153119943.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624153230274.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624153230274.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200624153253236.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200624153253236.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625115246327.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625115246327.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625115326564.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625115326564.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625120530471.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625120530471.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625121512927.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625121512927.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625132531990.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625132531990.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625133039681.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625133039681.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625134056362.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625134056362.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625135002921.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625135002921.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625153826013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625153826013.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625160009099.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625160009099.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625160328787.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625160328787.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625162503497.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625162503497.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625163008754.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625163008754.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625202723502.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625202723502.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625231954641.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625231954641.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200625231956986.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200625231956986.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626001040185.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626001040185.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626003927474.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626003927474.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626004030110.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626004030110.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626004041005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626004041005.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626112014470.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626112014470.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626112025049.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626112025049.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626121311132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626121311132.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626140953413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626140953413.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626141006349.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626141006349.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626143926380.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626143926380.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626144547172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626144547172.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626144554923.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626144554923.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626150208685.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626150208685.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626160636253.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626160636253.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626160703648.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626160703648.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626161936568.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626161936568.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626162000271.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626162000271.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626162651298.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626162651298.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626163447744.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626163447744.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626170442183.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626170442183.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626171249897.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626171249897.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626180045417.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626180045417.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626181040262.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626181040262.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626181431381.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626181431381.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626181756468.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626181756468.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626190716211.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626190716211.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626190722793.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626190722793.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200626190729763.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200626190729763.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200629162622577.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200629162622577.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200629163434571.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200629163434571.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200629220603352.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200629220603352.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200630155113214.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200630155113214.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200701110722817.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200701110722817.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200701175533905.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200701175533905.png -------------------------------------------------------------------------------- /COMP90020 DA/assets/image-20200701180043881.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90020 DA/assets/image-20200701180043881.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/Week8.3.md: -------------------------------------------------------------------------------- 1 | # Week 8.3 Serverless - FaaS 2 | 3 | 4 | 5 | ## What is? 6 | 7 | ### Definitions 8 | 9 | - FasS is also know as Serverless computing 10 | - Develop software applications without bothering with the infrastructure 11 | - Especially scaling-up and down as load increases or decreases 12 | - It is more Server-unseen than Server-less 13 | - A FaaS service allows functions to be 14 | - added 15 | - removed 16 | - updated 17 | - executed 18 | - auto-scaled 19 | - FaaS is an extreme form of *micro-service* architecture 20 | 21 | 22 | 23 | ### Why Functions 24 | 25 | - A function in computer science is typically a piece of code that takes in parameters and returns a value 26 | - Functions are the founding concept of functional programming 27 | - One of the oldest programming paradigms 28 | - Functions are (should be) 29 | - free of side-effects 30 | - ephemeral 31 | - stateless 32 | - Ideal for **parallel execution** and rapid **scaling up and down** 33 | 34 | 35 | 36 | ### Why Faas? 37 | 38 | - Simpler deployment 39 | - The service provider takes care of the infrastructure 40 | - Reduced computing costs 41 | - Only the time during which functions are executed is blind 42 | - Reduced application complexity due to loosely-coupled architecture 43 | 44 | 45 | 46 | ### Applications 47 | 48 | - Functions are triggered by events 49 | - Event-driven 50 | - Functions can call each other 51 | - Functions and events can be combined to build software applications 52 | - Application Examples 53 | - A function can be triggered every hour, or every time disk space on a volume is scarce, or when a pull-request is closed in Github 54 | - Combining event-driven scenarios and functions resembles how user interface software is built 55 | - User actions trigger the execution of piece of code 56 | 57 | 58 | 59 | ### FaaS Services and Framework 60 | 61 | - Commercial 62 | - AWS Lambda 63 | - Google Cloud 64 | - Azure Functions 65 | - Open source 66 | - OpenWhisk 67 | - OpenFaaS 68 | - Kubernetes Knative 69 | - Difference 70 | - Open source choice can be easily deployed on your cluster, peered into, disassembled and improved by you 71 | 72 | 73 | 74 | ## Functions 75 | 76 | ### Side-effect Free Functions 77 | 78 | - A function that does not modify the state of the system is said to be ***side-effect*** free, otherwise, it is not side-effect free 79 | - A function that takes an image and returns a thumbnail of that image 80 | - Can be run in parallel easily and guaranteed to return the same output given the same input 81 | - Side-effects are almost inevitable in a relatively complex system. 82 | - Must carefully consider how to run functions with side effects in parallel, as typically required in FaaS environments. 83 | 84 | 85 | 86 | ### Stateful/Stateless Function 87 | 88 | - Definition 89 | - A function output changes in relation to internally stored information, otherwise, it is a stateless function 90 | - Example 91 | - A function that adds items to a shopping cart 92 | 93 | - Stateful function $\sub$ functions with side-effects 94 | - Important as there are multiple instances of the same function, and there is no guarantee the same user would call the same function instance twice. 95 | 96 | 97 | 98 | ### Synchronous/Asynchronous Function 99 | 100 | - By default functions in FaaS are synchronous 101 | - Why async? 102 | - Function that takes longer time to return a result incur timeouts and lock connection with clients in the process 103 | - Asynchronous functions return a code that informs the client that the execution has started and then trigger an event when the execution completes 104 | - Publish/subscribe pattern, involving a queuing system, can be used to deal with async functions. 105 | 106 | 107 | 108 | ## OpenFaaS 109 | 110 | ### Properties 111 | 112 | - Open-source framework that uses Docker containers to deliver FaaS functionality 113 | - Every function in OpenFaaS is a Docker container, ensuring loose coupling between functions 114 | - Function can be written in different languages and mixed freely 115 | - Functions are passed a request as an object in the language of choice and return a response as an object 116 | - OpenFaaS can use either Docker Swarm or Kubernetes to manage cluster of nodes on which functions run 117 | - By using Docker containers as functions, OpenFaaS allow to freely mix different languages and environments at the cost of **decreased performance** as containers are inherently heavier than threads 118 | - However, it is possible to reduce the size to only a few MBs 119 | 120 | -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/cap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/cap.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200606224408873.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200606224408873.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200606224720570.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200606224720570.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200606224947716.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200606224947716.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200606225050281.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200606225050281.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607123750232.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607123750232.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607125015337.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607125015337.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607125729184.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607125729184.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607151339810.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607151339810.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607173548515.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607173548515.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607185126728.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607185126728.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607190603447.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607190603447.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200607192935563.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200607192935563.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608000121707.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608000121707.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608003142952.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608003142952.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608161004587.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608161004587.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608181037953.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608181037953.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608181441391.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608181441391.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608182903922.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608182903922.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608183029109.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608183029109.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608185909067.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608185909067.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200608230109926.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200608230109926.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200609181134447.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200609181134447.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200609194748538.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200609194748538.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200609201454702.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200609201454702.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200609202600880.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200609202600880.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200609202956676.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200609202956676.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200610160541581.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200610160541581.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200610161324054.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200610161324054.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/assets/image-20200610161333645.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90024 CCC/Note/assets/image-20200610161333645.png -------------------------------------------------------------------------------- /COMP90024 CCC/Note/week1.md: -------------------------------------------------------------------------------- 1 | # Week 1 - Information Session 2 | 3 | ## Cloud Characteristics (Lecture notes and then my paraphrasing) 4 | 5 | - On-demand self-service 6 | - A consumer can provision computing capabilities as needed without requiring human interaction with each service provider. 7 | - Scale computing resources up and down by needs without requiring human interaction with each service provider. 8 | - Networked access 9 | - Capabilities are available over the network and access through standard mechanisms that promote use by heterogeneous client platforms. 10 | - Resources and be access through network and adapted to heterogeneous client platforms. 11 | - Resource pooling 12 | - The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model potentially with different physical and virtual resources that can be dynamically assigned and reassigned according to consumer demand. 13 | - Provider’s resources are pooled and can be dynamically assigned and reassigned by need. 14 | - Rapid Elasticity 15 | - Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly upon demand. 16 | - Capabilities can scale easily and rapidly upon demand. 17 | - Measured Service 18 | - Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service. 19 | - Resourcing optimization by measuring usage 20 | 21 | ## Flavour 22 | 23 | - Compute clouds 24 | - Amazon Elastic compute cloud 25 | - Azure 26 | - Data Clouds 27 | - Amazon Simple Storage Service 28 | - Google docs 29 | - iCloud 30 | - Dropbox 31 | - Application Clouds 32 | - App store 33 | - Virtual image factories 34 | - Public/Private/Hybrid/Mobile/Health Clouds 35 | 36 | ## History 37 | 38 | ### Distributed System 39 | 40 | - **Transparency** and **heterogeneity** in computer-computer interactions 41 | - Finding resources -> Binding resources -> run time type checking -> invoking resources 42 | - Dealing with heterogeneous of system 43 | - Challenges 44 | - Complexity of implementations 45 | - Vendor specific solutions 46 | - Scalability problem 47 | - Sharing data between different organizations 48 | 49 | ### Grid Computing 50 | 51 | - From computer-computer focus to organisation-organisation focus 52 | - Can be thought of as a distributed system with non-interactive workloads. 53 | - It is in contrast to the traditional notion of a supercomputer, which has many processors connected by a local high-speed computer bus instead of Ethernet. 54 | - Challenge 55 | - What resources are available 56 | - To determine the status of resources 57 | - Job scheduling 58 | - Virtual organization support 59 | - Security 60 | - Public key infrasturctures 61 | 62 | 63 | 64 | ## Comparison between Grid/Cluster/Cloud Computing 65 | 66 | ## Grid computing 67 | 68 | - Refer to the top 69 | 70 | 71 | 72 | ### Cluster Computing 73 | 74 | - Clusters tend to be tightly coupled, e.g. a bunch of servers in a rack with high speed interconnects 75 | - Example 76 | - Super computer 77 | 78 | 79 | 80 | ### Cloud Computing 81 | 82 | - Refer to week 5 83 | - Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources(networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. -------------------------------------------------------------------------------- /COMP90024 CCC/Note/week2.md: -------------------------------------------------------------------------------- 1 | # Week 2 - Domain Driver -- why we need Cluster and Cloud Computing 2 | 3 | ## Compute Scaling 4 | 5 | - Massive amount of data generated among a time requires compute infrastructure 6 | - Mapping the sky with data from tele-scope 7 | - Cloud Computing in Different Domains 8 | - **High energy physics** 9 | - volume 10 | - ~25 PB data per year 11 | - volcity 12 | - Basic filtering from 40 million events per second to 0.1 million events per second 13 | - Two-stage data re-processing is performed several times a year on all data acquired since the LHC start-up 14 | - Astrophysics 15 | - **Macro-micro simulations** 16 | - Electronics 17 | - Arts and humanities 18 | - Life sciences 19 | - Social sciences 20 | - Aurin 21 | - Clinical sciences 22 | - Data sharing and ethics 23 | - e-Health 24 | - **Security** 25 | - environmental 26 | - social 27 | - geographical 28 | - Genome 29 | 30 | 31 | 32 | ## Versioning System 33 | 34 | ### What 35 | 36 | - Version control = Revision control = Source control 37 | - Managing changes to 38 | - Documents 39 | - programs 40 | - Large websites 41 | - Revision numbers 42 | - Letters or numbers used to represent each change 43 | 44 | 45 | 46 | ### Why 47 | 48 | - Work simultaneously on big projects and keep track of changes 49 | - Be able to simply revert back to a specific checkpoint in any project 50 | - Create necessary redundancy by duplicating codes and resources to avoid data loss 51 | 52 | 53 | 54 | ### Types 55 | 56 | - Local 57 | - This tool basically works by keeping patch sets using a special format in the version tracker and is stored in local hard disk. You may lose all data if local hardware failed. 58 | - Example 59 | - Revision Control System (RCS) 60 | - Centralised 61 | - In this approach, all the changes in the files are tracked under the centralized server. The centralized server includes all the information of versioned files, and list of clients that check out files from the central place. In this case, you could have more control over the system. 62 | - Examples 63 | - Subversion(SVN) 64 | - Concurrent version system (CVS) 65 | - Decentralised 66 | - The clients completely clone the repository including its full history, If any server dies, any of the client repositories can be copied on the the server which help restore the server and prevent single point of failure. However, in this case, you cannot, for example, have a fine-grained control of access for a single repository. 67 | - Example 68 | - Git -------------------------------------------------------------------------------- /COMP90024 CCC/Note/week4.md: -------------------------------------------------------------------------------- 1 | # Week4 - The Spartan HPC System 2 | 3 | ### Supercomputer 4 | 5 | - Any single computer system that has exceptional processing power for its time. 6 | 7 | ### HPC - high performance computing 8 | 9 | - It is any computer system whose architecture allows for above average performance 10 | - A collection of smaller computers strapped together with a high-speed local network 11 | 12 | ### Parallel and Research Programming 13 | 14 | - Parallel computing refers to the submission of jobs or processes over multiple processors and by splitting up the data or tasks between them 15 | - Research computing is the software applications used by a research community to aid research. 16 | 17 | ### Flynn’s Taxonomy and Multicore System 18 | 19 | - Over time computing systems have moved towards multi-processor, multi-core, and often multi-threaded and multi-node systems. 20 | - As computing technology has moved increasingly to the MIMD taxonomic classification additional categories have been added: 21 | - Single program, multiple data streams (SPMD) 22 | - Multiple program, multiple data streams (MPMD) 23 | 24 | ### Things are more important than performance 25 | 26 | - Correctness of code and signal 27 | - Clarity of code and architecture 28 | - Reliability of code and equipment 29 | - Modularity of code and components 30 | - Readability of code and hardware documentation 31 | - Compatibility of code and hardware 32 | 33 | ### Terms from the exam 34 | 35 | - Data parallelization 36 | - Split data into chunk and process each chunk in parallel (just like assignment 1) 37 | - Compute parallelization 38 | - Computation is not bound by data, for example, you have a for loop that create thousands and thousands of threads but each of them should run independently 39 | - Wall-time 40 | - The limit you say how long your program will run 41 | - If too long 42 | - Then others may suffer from resource starvation 43 | - If too short 44 | - The job may not finish in this short period 45 | 46 | -------------------------------------------------------------------------------- /COMP90024 CCC/Note/week5.md: -------------------------------------------------------------------------------- 1 | # Week 5 - Cloud Computing 2 | 3 | ## Concepts 4 | 5 | - Problem 6 | - Before cloud computing, the main issue is that capacity and utilization could not tightly meet. 7 | - ![image-20200607123750232](assets/image-20200607123750232.png) 8 | - Even if peak load can be correctly anticipated, without elasticity we waste resources during non-peak times. 9 | - Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources(networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. 10 | 11 | 12 | 13 | ## Deploy Models 14 | 15 | ### Overview 16 | 17 | ![image-20200607125015337](assets/image-20200607125015337.png) 18 | 19 | 20 | 21 | ### Public Clouds 22 | 23 | - Pros 24 | - Utility computing 25 | - Can focus on core business 26 | - cost-effective 27 | - Right-sizing 28 | - Democratisation of computing 29 | - Cons 30 | - Security 31 | - Loss of control 32 | - Possible lock-in 33 | - Dependency of Cloud provider continued existence 34 | 35 | 36 | 37 | ### Private Clouds 38 | 39 | - Pros 40 | - Control 41 | - Consolidation of resources 42 | - Easier to secure 43 | - Most trust 44 | - Cons 45 | - Relevance to core business? 46 | - Netflix to Amazon 47 | - Staff/management overheads 48 | - Hardware obsolescence 49 | - Over/under utilization challenges 50 | 51 | 52 | 53 | ### Hybrid Cloud 54 | 55 | - Example 56 | - Eucalyptus 57 | - VMWare vCloud Hybrid Service 58 | - Pros 59 | - Cloud-bursting 60 | - Use private cloud, but burst into public cloud when needed 61 | - Cons 62 | - How do you move data/resources when needed? 63 | - How to decide what data can go to public cloud? 64 | - Is the public cloud compliant with PCI-DSS? (Payment Card Industry - Data Security Standard) 65 | 66 | 67 | 68 | ## Delivery Model 69 | 70 | ### Overview 71 | 72 | ![image-20200607125729184](assets/image-20200607125729184.png) 73 | 74 | 75 | 76 | ### SaaS 77 | 78 | - Example 79 | - Gmail 80 | - MS Office 365 81 | 82 | ### PaaS 83 | 84 | - Example 85 | - ![image-20200607151339810](assets/image-20200607151339810.png) 86 | 87 | ### IaaS 88 | 89 | - Example 90 | - Amazon Web Services 91 | - Oracle Public Cloud 92 | - NeCTAR/Openstack Research Cloud 93 | 94 | 95 | 96 | ## Auto-Deployment -- Ansible 97 | 98 | - Reason for auto-deployment (**comparison**) 99 | - We are easy to forget what software we installed, and what steps we took to configure the system 100 | - Manual process is error-prone, can be non-repeatable 101 | - Snapshots are monolithic 102 | - Manual deployment provides no record of what has changed 103 | - Automation provides (**advantages**) 104 | - A record of what you did 105 | - Knowledge about the system in code 106 | - Making the process repeatable 107 | - Making the process programmable 108 | - Infrastructure as Code 109 | - Features about ansible (Pros) 110 | - Easy to learn 111 | - Playbooks in YAML, templates in Jinja2 112 | - Sequential execution 113 | - Minimal requirements 114 | - No need for centralized management servers/daemons 115 | - Single command to install 116 | - Using SSH to connect to target machine 117 | - Idempotent 118 | - Executing N times no different to executing once 119 | - Prevents side-effects from re-running scripts 120 | - Extensible 121 | - Write you own modules 122 | - Rolling updates 123 | - Useful for continuous deployment/zero downtime deployment 124 | - Inventory management 125 | - Dynamic inventory from external data sources 126 | - Execute tasks against host patterns 127 | - Ansible Vault for encryption 128 | 129 | -------------------------------------------------------------------------------- /COMP90025 Parallel and Multicore Computing/Lecture1.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | 4 | 5 | ## What is parallel computing 6 | 7 | - Subset of HPC, includes as other aspects that are not concerned with parallelism 8 | - Cache techniques 9 | - Data structure 10 | - Algorithm specialization 11 | - I/O optimization 12 | - Instruction reorganization 13 | - Optimizing compilers 14 | - A way to achieve high performance 15 | - Requires parallel architectures 16 | - No single architecture suits every problem 17 | - Sometimes parallelism is not effective 18 | - Big gap between parallel computing and theory and practice is possible 19 | 20 | 21 | 22 | 23 | 24 | ## Notations 25 | 26 | - $O$ is the lower bound of a function 27 | - Where the original function $f$ grows no faster than (a constant time of) function $g$ 28 | - $|f(n)| \leq c|g(n)|$ 29 | - $\Omega$ Is the upper bound 30 | - Where the original function $f$ grows no slower than (a constant time of) function $g$ 31 | - If $O(g(n)) = \Omega(g(n))$ 32 | - $\Theta(g(n)) = f(n)$ 33 | 34 | 35 | 36 | ## Models 37 | 38 | ### RAM 39 | 40 | 41 | 42 | ### PRAM 43 | 44 | - EREW 45 | - exclusive read, exclusive write 46 | - CREW 47 | - concurrent read, exclusive write 48 | - CRCW 49 | - concurrent read, concurrent write 50 | - ERCW 51 | - exclusive read, concurrent write 52 | 53 | 54 | 55 | #### Simultaneous Write Conflict Resolution 56 | 57 | - COMMON 58 | - Value is written $\iff$ all processors write the same value 59 | - Otherwise, error condition may be flagged 60 | - ARBGITRARY 61 | - A process is randomly picked to write to the memory 62 | - Randomness may or may not be usable 63 | - The algorithm should work regardless of which processor is picked 64 | - PRIORITY 65 | - The processor with the lowest identifier among the conflicting processors can write to the memory 66 | - COMBININING 67 | - A function of the conflicting values is written 68 | - Requires defining the combining operation 69 | 70 | 71 | 72 | #### Variations 73 | 74 | - Any algorithm that runs on a EREW PRAM will run on a CREW PRAM 75 | - ==Why? Can we guarantee the correctness in this case?== 76 | - Yes, since the EREW PRAM require to handle how multiple thread write to the same data location, however, this won’t happen at CREW PRAM 77 | - Any algorithm that runs on a CREW PRAM will run on a COMMON CRCW PRAM 78 | - 79 | 80 | -------------------------------------------------------------------------------- /COMP90051-SML/Exams/practice_2019S2-sol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Exams/practice_2019S2-sol.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Exams/practice_2019S2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Exams/practice_2019S2.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Exams/practice_2020S2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Exams/practice_2020S2.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Exams/sml-2017-s2-questions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Exams/sml-2017-s2-questions.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Exams/sml-exam-2016-s2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Exams/sml-exam-2016-s2.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/SML-final-revision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/SML-final-revision.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/01.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/01.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/01a_about_statml.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/01a_about_statml.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/01b_probability_review.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/01b_probability_review.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/01c_linalgebra_review.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/01c_linalgebra_review.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/01d_limits_review.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/01d_limits_review.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/02.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/02.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/02a_stat_schools_freq.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/02a_stat_schools_freq.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/02b_stat_schools_dtheory.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/02b_stat_schools_dtheory.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week1/02c_stat_schools_bayes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week1/02c_stat_schools_bayes.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week10/19_pgms.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week10/19_pgms.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week10/20_pgm_inference.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week10/20_pgm_inference.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week11/21_hmm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week11/21_hmm.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week11/22_gmm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week11/22_gmm.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week12/23_em.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week12/23_em.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week12/24_bayesian_rl.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week12/24_bayesian_rl.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week12/QA12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week12/QA12.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/03a_lin_regression_dtheory.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/03a_lin_regression_dtheory.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/03b_lin_regression_freq.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/03b_lin_regression_freq.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/03c_basis expansion.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/03c_basis expansion.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/04a_iterative_optim.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/04a_iterative_optim.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/04b_logistic_regression.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/04b_logistic_regression.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week2/04c_irls_algorithm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week2/04c_irls_algorithm.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week3/05 regularisation combined.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week3/05 regularisation combined.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week3/06 PAC learning combined.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week3/06 PAC learning combined.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week4/07 VC theory combined.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week4/07 VC theory combined.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week4/08 SVM combined.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week4/08 SVM combined.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week5/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/Users/xinyaoniu/anaconda3/bin/python" 3 | } -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week5/09_intro2dl.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week5/09_intro2dl.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week5/10_cnn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week5/10_cnn.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week5/__pycache__/output_size.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week5/__pycache__/output_size.cpython-37.pyc -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week5/output_size.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def op_size(ip_size, kernel_size, stride, padding=0): 4 | return math.ceil((ip_size - kernel_size+1)/stride) + 2*padding 5 | 6 | if __name__ == "__main__": 7 | print(op_size(5, 3, 1)) 8 | -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week6/11_cnn-architecture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week6/11_cnn-architecture.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week6/12_generative-model.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week6/12_generative-model.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week7/13_tcn-rnn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week7/13_tcn-rnn.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week7/14_GraphCNN.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week7/14_GraphCNN.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week8/15_multiplicative_weights.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week8/15_multiplicative_weights.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week8/16_bandits.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week8/16_bandits.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week9/17_bayesian_regression.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week9/17_bayesian_regression.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Lectures/Week9/18_bayesian_classification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Lectures/Week9/18_bayesian_classification.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week10/worksheet10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week10/worksheet10.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week10/worksheet10_solutions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week10/worksheet10_solutions.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week11/worksheet11a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week11/worksheet11a.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week11/worksheet11a_solutions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week11/worksheet11a_solutions.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week11/workshop11-slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week11/workshop11-slides.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week12/workshop12-slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week12/workshop12-slides.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week5/cats.csv: -------------------------------------------------------------------------------- 1 | HWT,BWT,SEX 2 | 2.00E+00,7.00E+00,F 3 | 2.00E+00,7.40E+00,F 4 | 2.00E+00,9.50E+00,F 5 | 2.10E+00,7.20E+00,F 6 | 2.10E+00,7.30E+00,F 7 | 2.10E+00,7.60E+00,F 8 | 2.10E+00,8.10E+00,F 9 | 2.10E+00,8.20E+00,F 10 | 2.10E+00,8.30E+00,F 11 | 2.10E+00,8.50E+00,F 12 | 2.10E+00,8.70E+00,F 13 | 2.10E+00,9.80E+00,F 14 | 2.20E+00,7.10E+00,F 15 | 2.20E+00,8.70E+00,F 16 | 2.20E+00,9.10E+00,F 17 | 2.20E+00,9.70E+00,F 18 | 2.20E+00,1.09E+01,F 19 | 2.20E+00,1.10E+01,F 20 | 2.30E+00,7.30E+00,F 21 | 2.30E+00,7.90E+00,F 22 | 2.30E+00,8.40E+00,F 23 | 2.30E+00,9.00E+00,F 24 | 2.30E+00,9.00E+00,F 25 | 2.30E+00,9.50E+00,F 26 | 2.30E+00,9.60E+00,F 27 | 2.30E+00,9.70E+00,F 28 | 2.30E+00,1.01E+01,F 29 | 2.30E+00,1.01E+01,F 30 | 2.30E+00,1.06E+01,F 31 | 2.30E+00,1.12E+01,F 32 | 2.40E+00,6.30E+00,F 33 | 2.40E+00,8.70E+00,F 34 | 2.40E+00,8.80E+00,F 35 | 2.40E+00,1.02E+01,F 36 | 2.50E+00,9.00E+00,F 37 | 2.50E+00,1.09E+01,F 38 | 2.60E+00,8.70E+00,F 39 | 2.60E+00,1.01E+01,F 40 | 2.60E+00,1.01E+01,F 41 | 2.70E+00,8.50E+00,F 42 | 2.70E+00,1.02E+01,F 43 | 2.70E+00,1.08E+01,F 44 | 2.90E+00,9.90E+00,F 45 | 2.90E+00,1.01E+01,F 46 | 2.90E+00,1.01E+01,F 47 | 3.00E+00,1.06E+01,F 48 | 3.00E+00,1.30E+01,F 49 | 2.00E+00,6.50E+00,M 50 | 2.00E+00,6.50E+00,M 51 | 2.10E+00,1.01E+01,M 52 | 2.20E+00,7.20E+00,M 53 | 2.20E+00,7.60E+00,M 54 | 2.20E+00,7.90E+00,M 55 | 2.20E+00,8.50E+00,M 56 | 2.20E+00,9.10E+00,M 57 | 2.20E+00,9.60E+00,M 58 | 2.20E+00,9.60E+00,M 59 | 2.20E+00,1.07E+01,M 60 | 2.30E+00,9.60E+00,M 61 | 2.40E+00,7.30E+00,M 62 | 2.40E+00,7.90E+00,M 63 | 2.40E+00,7.90E+00,M 64 | 2.40E+00,9.10E+00,M 65 | 2.40E+00,9.30E+00,M 66 | 2.50E+00,7.90E+00,M 67 | 2.50E+00,8.60E+00,M 68 | 2.50E+00,8.80E+00,M 69 | 2.50E+00,8.80E+00,M 70 | 2.50E+00,9.30E+00,M 71 | 2.50E+00,1.10E+01,M 72 | 2.50E+00,1.27E+01,M 73 | 2.50E+00,1.27E+01,M 74 | 2.60E+00,7.70E+00,M 75 | 2.60E+00,8.30E+00,M 76 | 2.60E+00,9.40E+00,M 77 | 2.60E+00,9.40E+00,M 78 | 2.60E+00,1.05E+01,M 79 | 2.60E+00,1.15E+01,M 80 | 2.70E+00,8.00E+00,M 81 | 2.70E+00,9.00E+00,M 82 | 2.70E+00,9.60E+00,M 83 | 2.70E+00,9.60E+00,M 84 | 2.70E+00,9.80E+00,M 85 | 2.70E+00,1.04E+01,M 86 | 2.70E+00,1.11E+01,M 87 | 2.70E+00,1.20E+01,M 88 | 2.70E+00,1.25E+01,M 89 | 2.80E+00,9.10E+00,M 90 | 2.80E+00,1.00E+01,M 91 | 2.80E+00,1.02E+01,M 92 | 2.80E+00,1.14E+01,M 93 | 2.80E+00,1.20E+01,M 94 | 2.80E+00,1.33E+01,M 95 | 2.80E+00,1.35E+01,M 96 | 2.90E+00,9.40E+00,M 97 | 2.90E+00,1.01E+01,M 98 | 2.90E+00,1.06E+01,M 99 | 2.90E+00,1.13E+01,M 100 | 2.90E+00,1.18E+01,M 101 | 3.00E+00,1.00E+01,M 102 | 3.00E+00,1.04E+01,M 103 | 3.00E+00,1.06E+01,M 104 | 3.00E+00,1.16E+01,M 105 | 3.00E+00,1.22E+01,M 106 | 3.00E+00,1.24E+01,M 107 | 3.00E+00,1.27E+01,M 108 | 3.00E+00,1.33E+01,M 109 | 3.00E+00,1.38E+01,M 110 | 3.10E+00,9.90E+00,M 111 | 3.10E+00,1.15E+01,M 112 | 3.10E+00,1.21E+01,M 113 | 3.10E+00,1.25E+01,M 114 | 3.10E+00,1.30E+01,M 115 | 3.10E+00,1.43E+01,M 116 | 3.20E+00,1.16E+01,M 117 | 3.20E+00,1.19E+01,M 118 | 3.20E+00,1.23E+01,M 119 | 3.20E+00,1.30E+01,M 120 | 3.20E+00,1.35E+01,M 121 | 3.20E+00,1.36E+01,M 122 | 3.30E+00,1.15E+01,M 123 | 3.30E+00,1.20E+01,M 124 | 3.30E+00,1.41E+01,M 125 | 3.30E+00,1.49E+01,M 126 | 3.30E+00,1.54E+01,M 127 | 3.40E+00,1.12E+01,M 128 | 3.40E+00,1.22E+01,M 129 | 3.40E+00,1.24E+01,M 130 | 3.40E+00,1.28E+01,M 131 | 3.40E+00,1.44E+01,M 132 | 3.50E+00,1.17E+01,M 133 | 3.50E+00,1.29E+01,M 134 | 3.50E+00,1.56E+01,M 135 | 3.50E+00,1.57E+01,M 136 | 3.50E+00,1.72E+01,M 137 | 3.60E+00,1.18E+01,M 138 | 3.60E+00,1.33E+01,M 139 | 3.60E+00,1.48E+01,M 140 | 3.60E+00,1.50E+01,M 141 | 3.70E+00,1.10E+01,M 142 | 3.80E+00,1.48E+01,M 143 | 3.80E+00,1.68E+01,M 144 | 3.90E+00,1.44E+01,M 145 | 3.90E+00,2.05E+01,M 146 | -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week5/worksheet05a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week5/worksheet05a.pdf -------------------------------------------------------------------------------- /COMP90051-SML/Tutorials/Week5/workshop05-slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90051-SML/Tutorials/Week5/workshop05-slides.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Notes/summary.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Notes/summary.docx -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/Week 6 - Width-based planning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/Week 6 - Width-based planning.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/Week2-Search Algorithms.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/Week2-Search Algorithms.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/Week3-Introduction to planning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/Week3-Introduction to planning.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/Week5 - delete relxation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/Week5 - delete relxation.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/Week7 MDPs-value-policy-iteration.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/Week7 MDPs-value-policy-iteration.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/mcts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/mcts.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/model-free-RL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/model-free-RL.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/pre-handout-11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/pre-handout-11.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/pre-handout-13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/pre-handout-13.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/problem_set_03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/problem_set_03.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Lectures/week4-generating heuristic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Lectures/week4-generating heuristic.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Solution1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Solution1.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Solution3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Solution3.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Solution4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Solution4.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Solution6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Solution6.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Totorial4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Totorial4.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial1.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial3.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial5.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial6.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial7.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial8.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Tutorial9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Tutorial9.pdf -------------------------------------------------------------------------------- /COMP90054-AIPA/Slides/Tutorials/Week5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90054-AIPA/Slides/Tutorials/Week5.pdf -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/Questions.md: -------------------------------------------------------------------------------- 1 | ## Week 3 2 | 3 | 1. Does $R_0$ only counting between primary and secondary? 4 | 2. After vaccination, the $R_0$ still > 0, are we only counting the primary and second if the people is susceptible 5 | 6 | -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/Week3.md: -------------------------------------------------------------------------------- 1 | # Analysing models 2 | 3 | ## Definition 4 | 5 | ### What does it mean by analyse? 6 | 7 | - ![image-20200820175420529](assets/image-20200820175420529.png) 8 | 9 | - To examine how valid our model is as representation of that pattern of behaviour that we expect to see in the real world. 10 | - We may need to improve 11 | - Performance 12 | - User interface that allowed easier changing on variables 13 | 14 | 15 | 16 | ### Why model, but not real world? 17 | 18 | - ![image-20200820180010222](assets/image-20200820180010222.png) 19 | - It is unethical to spread a disease to explore how it spread in the whole population. 20 | - ![image-20200820180056869](image-20200820180056869.png) 21 | - We can re-run our model many times we like to collect the data. 22 | - We could analyse the data in different level by using the model 23 | 1. In terms of the whole system 24 | 2. In terms of the individuals. 25 | 26 | 27 | 28 | ## Modelling for science 29 | 30 | > Use the model to find how the real world works 31 | 32 | ![image-20200820180533490](assets/image-20200820180533490.png) 33 | 34 | 35 | 36 | ## Definition of agents 37 | 38 | ![image-20201125221820892](assets/image-20201125221820892.png) 39 | 40 | -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807004123849.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807004123849.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807004717913.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807004717913.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807004747848.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807004747848.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807004807317.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807004807317.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807004928310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807004928310.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200807011729687.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200807011729687.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200810163137801.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200810163137801.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200810164929030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200810164929030.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200810165300118.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200810165300118.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200813135942955.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200813135942955.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200813195858011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200813195858011.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200820175420529.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200820175420529.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200820180010222.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200820180010222.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200820180056869.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200820180056869.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20200820180533490.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20200820180533490.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/assets/image-20201125221820892.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/assets/image-20201125221820892.png -------------------------------------------------------------------------------- /COMP90083-Computational Modelling and Simulation/image-20200820180056869.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/COMP90083-Computational Modelling and Simulation/image-20200820180056869.png -------------------------------------------------------------------------------- /CS/General questions.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Fixed 4 | 5 | - What does confidentiality mean in cryptography (fixed) 6 | - make sure that nobody in between site A and B is able to read what data or information is sent between the to sites 7 | - Week 10 tutorial 8 | - 4 answer 9 | - What is hidden terminal problem? 10 | - Why it not capable of transmitting and receiving at the same time? 11 | - 5 answer 12 | - Does not understand the answer 13 | - Difference between micro-ops and micro-code 14 | - Refer to the lecture “micro-code is stored in ROM on the CPU”, does that means that ROM could be split further into micro-ops which could be executed by cpu. 15 | - Are we required to remember the detail of probe request and beacon frame? 16 | - yes 17 | - But security details no 18 | - What is duplex really mean in ethernet? Also difference between full and half duplex (examinable? Skipped in revision lecture) 19 | - Why full duplex makes collision impossible? 20 | - Full duplex mean two direction wire for each end system 21 | - Tutorial 11 22 | - Question 8 why shallower pipe didn't suffer the similar problems. 23 | - More likely to be interrupted 24 | - Exam question similar to tutorial questions? 25 | - Are we going to remember all the micro ops? 26 | - No 27 | - Week 10 tutorial (all fixed except **1d**) 28 | - 1d, what is the value for the offset? 29 | - Without the header 30 | - Memory (W11L1) 31 | - Associative cache? 32 | - This is a brand new cache from hardware perspective if 33 | - on chip? 34 | - On cpu 35 | 36 | -------------------------------------------------------------------------------- /CS/Week12.md: -------------------------------------------------------------------------------- 1 | ### Spectre Vulnerability 2 | 3 | - Goal: Read memory we shouldn’t be able to 4 | - Kernel memory is in process address space 5 | - Javascript is executed in a “sandbox” within a browser’s process; it is not allowed to access the main process’s data 6 | - Techniques 7 | - Misleading branch prediction 8 | - Speculatively execute illegal code in victim process 9 | - Observe impact on cache in spectre process 10 | - Side channel: Way of communicating that was not intended for communication 11 | - Cache-based side channel: reads data from well-spaced memory addresses 12 | - Before the attack, Spectre flushes the cache 13 | - Access to most cache lines is slow; only one will be fast 14 | - It is possible to use the ill-gotten data to make a change to the “micro-architectural state” 15 | - All register in CPU 16 | - Ways of inducing speculative execution 17 | - Inside sandbox: attack code written by others in our address space 18 | - eBPF 19 | - VMs allow guests to use extended BPF 20 | - A Spectre gadget written in eBPF can leak hypervisor code 21 | -------------------------------------------------------------------------------- /CS/assets/0F35C341-A2F3-4267-A6F8-0D93EABC9366.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/0F35C341-A2F3-4267-A6F8-0D93EABC9366.png -------------------------------------------------------------------------------- /CS/assets/1B68B60C-3562-4478-9441-9953CD198C65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/1B68B60C-3562-4478-9441-9953CD198C65.png -------------------------------------------------------------------------------- /CS/assets/3184B04C-094C-40F5-A128-BF07032A223A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/3184B04C-094C-40F5-A128-BF07032A223A.png -------------------------------------------------------------------------------- /CS/assets/6D6C419A-3A07-41B1-B812-3D2DBBAF88C8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/6D6C419A-3A07-41B1-B812-3D2DBBAF88C8.png -------------------------------------------------------------------------------- /CS/assets/image-20190319203854228.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190319203854228.png -------------------------------------------------------------------------------- /CS/assets/image-20190319211125198.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190319211125198.png -------------------------------------------------------------------------------- /CS/assets/image-20190319211133616.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190319211133616.png -------------------------------------------------------------------------------- /CS/assets/image-20190319215655007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190319215655007.png -------------------------------------------------------------------------------- /CS/assets/image-20190326232321041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190326232321041.png -------------------------------------------------------------------------------- /CS/assets/image-20190327000048872.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327000048872.png -------------------------------------------------------------------------------- /CS/assets/image-20190327000130093.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327000130093.png -------------------------------------------------------------------------------- /CS/assets/image-20190327001945778.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327001945778.png -------------------------------------------------------------------------------- /CS/assets/image-20190327002015513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327002015513.png -------------------------------------------------------------------------------- /CS/assets/image-20190327142746308.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327142746308.png -------------------------------------------------------------------------------- /CS/assets/image-20190327142912731.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190327142912731.png -------------------------------------------------------------------------------- /CS/assets/image-20190330163926424.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330163926424.png -------------------------------------------------------------------------------- /CS/assets/image-20190330163930298.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330163930298.png -------------------------------------------------------------------------------- /CS/assets/image-20190330165415678.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330165415678.png -------------------------------------------------------------------------------- /CS/assets/image-20190330165920021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330165920021.png -------------------------------------------------------------------------------- /CS/assets/image-20190330235149980.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330235149980.png -------------------------------------------------------------------------------- /CS/assets/image-20190330235153339.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190330235153339.png -------------------------------------------------------------------------------- /CS/assets/image-20190402224949944.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190402224949944.png -------------------------------------------------------------------------------- /CS/assets/image-20190405101144471.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190405101144471.png -------------------------------------------------------------------------------- /CS/assets/image-20190405112740616.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190405112740616.png -------------------------------------------------------------------------------- /CS/assets/image-20190405112756638.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190405112756638.png -------------------------------------------------------------------------------- /CS/assets/image-20190407111241888.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190407111241888.png -------------------------------------------------------------------------------- /CS/assets/image-20190407111257633.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190407111257633.png -------------------------------------------------------------------------------- /CS/assets/image-20190407113303510.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190407113303510.png -------------------------------------------------------------------------------- /CS/assets/image-20190410002725427.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190410002725427.png -------------------------------------------------------------------------------- /CS/assets/image-20190411002040621.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190411002040621.png -------------------------------------------------------------------------------- /CS/assets/image-20190422165301599.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190422165301599.png -------------------------------------------------------------------------------- /CS/assets/image-20190430232313639.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190430232313639.png -------------------------------------------------------------------------------- /CS/assets/image-20190430233231589.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190430233231589.png -------------------------------------------------------------------------------- /CS/assets/image-20190502205123231.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190502205123231.png -------------------------------------------------------------------------------- /CS/assets/image-20190502205126735.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190502205126735.png -------------------------------------------------------------------------------- /CS/assets/image-20190506010919569.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190506010919569.png -------------------------------------------------------------------------------- /CS/assets/image-20190506011602650.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190506011602650.png -------------------------------------------------------------------------------- /CS/assets/image-20190507105247712.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190507105247712.png -------------------------------------------------------------------------------- /CS/assets/image-20190507105249249.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190507105249249.png -------------------------------------------------------------------------------- /CS/assets/image-20190507105250809.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190507105250809.png -------------------------------------------------------------------------------- /CS/assets/image-20190507105558021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190507105558021.png -------------------------------------------------------------------------------- /CS/assets/image-20190509140004546.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190509140004546.png -------------------------------------------------------------------------------- /CS/assets/image-20190512202044485.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190512202044485.png -------------------------------------------------------------------------------- /CS/assets/image-20190512204718126.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190512204718126.png -------------------------------------------------------------------------------- /CS/assets/image-20190512210323574.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190512210323574.png -------------------------------------------------------------------------------- /CS/assets/image-20190516113442275.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190516113442275.png -------------------------------------------------------------------------------- /CS/assets/image-20190605105211602.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605105211602.png -------------------------------------------------------------------------------- /CS/assets/image-20190605105221830.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605105221830.png -------------------------------------------------------------------------------- /CS/assets/image-20190605113135125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605113135125.png -------------------------------------------------------------------------------- /CS/assets/image-20190605113142422.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605113142422.png -------------------------------------------------------------------------------- /CS/assets/image-20190605113150185.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605113150185.png -------------------------------------------------------------------------------- /CS/assets/image-20190605125415973.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605125415973.png -------------------------------------------------------------------------------- /CS/assets/image-20190605132843742.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605132843742.png -------------------------------------------------------------------------------- /CS/assets/image-20190605153523166.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605153523166.png -------------------------------------------------------------------------------- /CS/assets/image-20190605153533311.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605153533311.png -------------------------------------------------------------------------------- /CS/assets/image-20190605230136412.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605230136412.png -------------------------------------------------------------------------------- /CS/assets/image-20190605232436409.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190605232436409.png -------------------------------------------------------------------------------- /CS/assets/image-20190606104920175.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190606104920175.png -------------------------------------------------------------------------------- /CS/assets/image-20190606190248093.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190606190248093.png -------------------------------------------------------------------------------- /CS/assets/image-20190611213547244.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190611213547244.png -------------------------------------------------------------------------------- /CS/assets/image-20190611213615960.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/CS/assets/image-20190611213615960.png -------------------------------------------------------------------------------- /CS/week4.md: -------------------------------------------------------------------------------- 1 | ### RDT 2.1 (checksums for ACK, 1-bit sequence number) 2 | 3 | - Sender 4 | - ![image-20190327000048872](assets/image-20190327000048872.png) 5 | 6 | - Receiver 7 | - ![image-20190327000130093](assets/image-20190327000130093.png) 8 | 9 | ### RDT 2.2 (duplicate ACK for the last correctly received packet) 10 | 11 | - Instead of sending NAK packets, we can simply sends an ACK packet for the last correctly received packet 12 | - If the last received file has sequence number of 1 13 | - In RDT 2.1, it needs to send a NAK packet 14 | - IN RDT 2.2, it sends a ACK packet indicating 1 15 | - sender 16 | - ![image-20190327001945778](assets/image-20190327001945778.png) 17 | - receiver 18 | - 19 | 20 | ![image-20190327002015513](assets/image-20190327002015513.png) 21 | 22 | 23 | 24 | ### RDT 3.0 25 | 26 | - The underlying channel can lost packets as well 27 | 28 | - Sender and Receiver 29 | 30 | - ![image-20190411002040621](assets/image-20190411002040621.png) 31 | 32 | - How to detect packet lost? 33 | 34 | - Timers can help, if timeout, we just start the retransmission. 35 | 36 | - What to do? 37 | 38 | - The techniques of RDT 2.2 can handle the job 39 | - Retransmission is a panacea 40 | 41 | - Sequence diagram 42 | 43 | - ![image-20190327142746308](assets/image-20190327142746308.png) 44 | 45 | - Replies multiple times 46 | 47 | ![image-20190327142912731](assets/image-20190327142912731.png) 48 | 49 | - However, this is not a good choice for practice 50 | 51 | - Since when the distance is long between two host, the waiting time will be really long. 52 | 53 | ### Pipelined RDT Protocols 54 | 55 | - Send multiple packets without waiting for acknowledgements 56 | - 1-bit sequence is no longer sufficient, it needs unique sequence number 57 | - Buffer now is important to keep the transmitted but not yet acknowledged packets. 58 | - TCP 59 | - Coneection-oriented 60 | 61 | - Handshake is needed 62 | 63 | - Buffers and variable 64 | 65 | - To keep info during three-way handshake 66 | 67 | - Full-duplex 68 | 69 | - Both sides can send a stream of data to each other (mutual communication) 70 | 71 | - Two type of socket on server side 72 | 73 | - Welcoming socket 74 | - Initiate a connection 75 | - Connection socket 76 | - After the connection has been built, the connection socket dedicate for a particular client process 77 | 78 | - How to transmit? 79 | 80 | - Grab data chunks from the send buffer, creates TCP segments and passes the segments to the system. 81 | 82 | - Socket identifier 83 | 84 | - Four section tuple 85 | 86 | - (source IP, source port number, destination IP address, destination port number) 87 | 88 | - Why need port number this time? 89 | 90 | - Since the connection requests are primarily handled by welcome socket. However, when building a dedicated connection socket, it must to identify which socket is working for who. 91 | 92 | - Structure (the IP info has been sent by the underlying operating system automatically) 93 | 94 | ![image-20190330165415678](assets/image-20190330165415678.png) 95 | 96 | - Sequence number 97 | 98 | - Normally using the first bit of a sequence 99 | - since TCP does not restrict that each message must in same length 100 | - Use in Acknowledgement for identifying missing packets 101 | 102 | - Acknowledgement Number 103 | 104 | - sequence number of the next segment that Host A is expecting from Host B 105 | - Only acknowledges bytes up to the first missing byte in the stream. (cumulative acknowledgements) 106 | - ![image-20190330165920021](assets/image-20190330165920021.png) 107 | - In this case Host a will put 228 108 | 109 | - TCP combines an acknowledgement and a data packet together in a single segment 110 | 111 | - Example 112 | 113 | - Talnet 114 | 115 | ![image-20190330235153339](assets/image-20190330235153339.png) 116 | 117 | - Out-of-order segments 118 | 119 | - Discard the segments, very easy to implement 120 | - Buffer the segments and waits for the missing bytes to fill the gap (what we normally used in practice) 121 | - More efficient in terms of network bandwidth 122 | -------------------------------------------------------------------------------- /DOA_EXTENTION/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/DOA_EXTENTION/README.md -------------------------------------------------------------------------------- /EODP/2016.md: -------------------------------------------------------------------------------- 1 | 1. ignore 1b and 1c 2 | - a) een(t)+(h)\* or eent+h\* or een\[t\]+\[h\]\* 3 | - d) 4 | - i) treat object and feature values as a metric. Using matrix factorization technique to factorize the metric with lowest possible error, *which can be calculate by finding the square distance between known values and predicted values.* Then fill the missing with the predicted value. **(James said that you only need to specify how to calculate the error here)** 5 | - ii) 1. the data set is huge 2.teasy and fast 3. we want a unbiased distribution of our answer. 6 | 2. no ignores 7 | - a) 8 | - i) 9 | - limitation: one limitation is comes from the dataset. By commom sense, students are seldomly more than 10 hours a day. Therefore, the results may not fit these people. Also, Pearson correlation can only tell correlation instead of causality. 10 | - alternative explanation 11 | - In a certain range of time, spending more time on study tend to result in a higher score. 12 | - time spending on study becomes a factores that may positively affact a student score. 13 | - ii) 14 | - he made his bins badly 15 | - wrong calculation 16 | - b) 17 | - The meaning of prediction is using the informations that we know to predict unknown informations. If we use the test set as training set, which means using known data to predict know data. The classifer tends to find the data instead of making a prediction. Therefore, the results are likely to be over optimistic. 18 | - c) 19 | - H(Parent) = -50/200\*(log50/200) - 150/200\*(log150/200) 20 | - H(Parent|First) = 50/200\*(-log25/50) 21 | - H(Parent|Second) = 150/200\*(-25/150\*log25/150 - 125/150\*(log125/150)) 22 | - gain = H(parent) - H(Parent|First) - H(Parent|Second) 23 | - The larger the gain, the better the split 24 | 3. no ignore 25 | - a) 26 | - | | 1 | 2 | 3 | 27 | |--- |----------- |----------- |----------- | 28 | | 1 | 0 | sqrt(200) | sqrt(250) | 29 | | 2 | sqrt(200) | 0 | sqrt(650) | 30 | | 3 | sqrt(250) | sqrt(650) | 0 | 31 | - b) 32 | - before reordering the heatmap, it's normally quite hard for us to identify the number of cluster for the heatmap. After put the similar item closer by using VAT, the pattern(number of clusters) can be found easier. 33 | - c) 34 | - No. Since the dataset is too small, no need of reducing features or dimensionality reduction. additionally, it won't generate more useful informations by using this technique. 35 | - d) 36 | - using parallel coordinates can visualisation the trend of changing for each item at the same time, but VAT can't. 37 | - VAT is a very stable and systematical way to visualise clusters in heat map. However, the parallel depends on how good the data is ordered. 38 | - e) 39 | - 2 parties protocal using hash function to join same record, whereas, a little difference can result in a big difference in hashed results. In this way, same record won't be linked. 40 | 4. ignore 4c 4e 41 | - a) 42 | - contextual outlier is the concept of data that becomes outlier in the given context. 43 | - why important 44 | - to distinguish abnormal data from the dataset based on the given context 45 | - b) 46 | - to recommand item to the user that based on similar users comparing to the target user 47 | - why important 48 | - give us another choice for collaborative filter 49 | - d) 50 | - instead of compare each record in two table, we only compare the blocks when doing table join. 51 | - why important 52 | - with proper b size, the join speed up dramaticaclly and still hold a very high accuracy. 53 | 5. no ignore 54 | - a) difference is that one is clustering based method and k-nn is classification based method no need of finding the cluster. 55 | - cluster based outlier detection 56 | - advantages: more intuitive and less calculate is needed 57 | - disadvantages: number of clusters and the starting point of the centroids may bias the results. 58 | - KNN 59 | - advantages: easier to calculate. 60 | - disadvantages: hard to determine the size of k. 61 | - b) 62 | - the normal visit place pair (for example, home and class) may lead to a small set of potential individuals. To solve this, just make sure the k-anonymity, that is, the people is undistinguishable from k others. 63 | - regular visit places might be found. To solve this, just reduce the frequency of temporal information. 64 | - c) 65 | - data wrangling is the process of organising, converting, mapping data from one format to another, which has the most number of steps in data processing. 66 | - For different data, we are using similar approach to analysis, but before that, how can we tranfer raw data to usable data is a quite challenge and time consuming task. 67 | -------------------------------------------------------------------------------- /EODP/2017.md: -------------------------------------------------------------------------------- 1 | 1. question 2 | - a) i) http://study.com ii) http://compute.com iii) http://compute.com 3 | - b) 4 | ```JSON 5 | { 6 | "degree": { 7 | "subject": { 8 | "name" : "COMP20008", 9 | "lecture" :"Lec1", 10 | "workshop":"Work1" 11 | } 12 | } 13 | } 14 | ``` 15 | - c) PCA 16 | - advantages 17 | - it can redunce the number of features and noise without lossing much informations 18 | - help clustering and visualisation 19 | - disadvantages 20 | - lose information 21 | - relies on linear assumptions, that is, if their are no linear reltion between data at all, PCA won't help much. ***extra*** 22 | - d) missing data 23 | - when people doing survey, they not always answer all the questions. 24 | - e) data wrangling including visualisation,at this stage draw a boxplot may help us to find and remove the outlier. 25 | 2. question 26 | - a) 27 | - i) the purpose of VAT is to reorder the heatmap and to find the number of k for k-means algorithm (or number of clusters). In this case, put the most similar objects together can help us to visualise. 28 | - ii) P including the sequence of reordered dissimilarity matrix. Therefore, the new matrix can be created by take the point out of P one by one. 29 | - b) 30 | - parallel-coordinates is better 31 | - parallel-coordinates can tell something about correlations between peers features 32 | - VAT is better 33 | - can tell number of clusters 34 | - c) 35 | - scenario: people buying stuff online 36 | - user based methods is to find similar users and recommand the things that user A bought but user B haven't bought yet. 37 | - item based methods is to find similar items and recommand the similar item based on what the user already bought. 38 | 39 | 3. question 40 | - a) no, since pearson correlation needs numerical data but this is categorical data. 41 | - b) H\(P\)= -(1/2log1/2+1/2log1/2) 42 | - c) MI(P,A) = H(P ) - H(P|A) = H(P ) + (3/5log3/5+2/5log2/5) NMI(P,A) = MI(P,A) / H(P) 43 | - d) 6/10 44 | - e) it is possible, complete flep the class labels. 45 | - f) unbias way to evaluate how good is classifer 46 | 4. question 47 | - a) row1: 0,sqrt(17),sqrt(32),sqrt(200) row2: sqrt(17),0, 2, 10 row3:sqrt(32),2,0,sqrt(72) row4:sqrt(200),10,sqrt(72), 0 48 | - b) question 49 | - different 50 | - D' need more calculations, so is slower. 51 | - similar 52 | - same centroids 53 | - same cluster 54 | - same number of iterations 55 | - c) question 56 | - i) It should decrease. as the number of clusters increases, the number of centroids increases, and each cluster become smaller. Therefore, the centroids will closer to each point in that cluster, that is, smaller SSE for each cluster. 57 | - ii) sa > sb, since clusters in A are more away from their centroids. 58 | - d) the cost of directly compare is n\*m, but when using block is (u\*m/b), which is much quicker than directly compare but still hold decent accuracy with proper size of b. 59 | 5. question 60 | - a) global sensitive describe how much difference a individual presents or absents affect the result. Higher global sensitive means more noise need to be added to the output. 61 | - b) 3. Since we have 3 different features, any removal on object will change these three features. 62 | - c) increase. No effect. 63 | - d) it is really time consuming to do the preprocessing 64 | - e) questions 65 | - i) zip code and Age, since they are the only visiable two and not sensitive information. 66 | - ii) if know a person live in a place with zip code 305* and are around 30 years old, its POI must be bar. 67 | -------------------------------------------------------------------------------- /ML/assets/FF057575-BF1B-44D4-86EF-D180A001F9CA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/FF057575-BF1B-44D4-86EF-D180A001F9CA.png -------------------------------------------------------------------------------- /ML/assets/image-20190319000158230.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190319000158230.png -------------------------------------------------------------------------------- /ML/assets/image-20190325222555379.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190325222555379.png -------------------------------------------------------------------------------- /ML/assets/image-20190325222816765.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190325222816765.png -------------------------------------------------------------------------------- /ML/assets/image-20190325222914628.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190325222914628.png -------------------------------------------------------------------------------- /ML/assets/image-20190409153342377.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190409153342377.png -------------------------------------------------------------------------------- /ML/assets/image-20190614143328773.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614143328773.png -------------------------------------------------------------------------------- /ML/assets/image-20190614145621704.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614145621704.png -------------------------------------------------------------------------------- /ML/assets/image-20190614180000891.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614180000891.png -------------------------------------------------------------------------------- /ML/assets/image-20190614180016897.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614180016897.png -------------------------------------------------------------------------------- /ML/assets/image-20190614231111970.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614231111970.png -------------------------------------------------------------------------------- /ML/assets/image-20190614234204923.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190614234204923.png -------------------------------------------------------------------------------- /ML/assets/image-20190615154242603.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190615154242603.png -------------------------------------------------------------------------------- /ML/assets/image-20190615155937957.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190615155937957.png -------------------------------------------------------------------------------- /ML/assets/image-20190615164524229.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190615164524229.png -------------------------------------------------------------------------------- /ML/assets/image-20190615170105809.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190615170105809.png -------------------------------------------------------------------------------- /ML/assets/image-20190616125346785.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616125346785.png -------------------------------------------------------------------------------- /ML/assets/image-20190616182727806.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616182727806.png -------------------------------------------------------------------------------- /ML/assets/image-20190616183252663.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616183252663.png -------------------------------------------------------------------------------- /ML/assets/image-20190616185026505.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616185026505.png -------------------------------------------------------------------------------- /ML/assets/image-20190616185226462.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616185226462.png -------------------------------------------------------------------------------- /ML/assets/image-20190616185336007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616185336007.png -------------------------------------------------------------------------------- /ML/assets/image-20190616192949382.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/ML/assets/image-20190616192949382.png -------------------------------------------------------------------------------- /ML/newton.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def newton(n, e): 4 | theta = n/2 5 | error = 99999 6 | count = 0 7 | 8 | while(error > e): 9 | theta -= (theta**2 - n) / (2*theta) 10 | error = theta**2 - n 11 | count += 1 12 | 13 | print("guess", count, "times") 14 | return theta 15 | -------------------------------------------------------------------------------- /ML/week1.md: -------------------------------------------------------------------------------- 1 | ### Definitions 2 | 3 | > **Instance** : A real world examples of a concept 4 | > 5 | > **Attributes** : measuring aspects of an instance 6 | > 7 | > **Concepts** : What we want to learn in the form of labels or classes 8 | 9 | 10 | 11 | ### Type of Task in ML 12 | 13 | >**Supervised** : prior knowledge of the relationship between instance and labels required 14 | > 15 | >**Unsupervised**: no external label required 16 | 17 | - Classification 18 | - **Supervised** 19 | - Learning predicting which class does the new object belonging 20 | ![FF057575-BF1B-44D4-86EF-D180A001F9CA](assets/FF057575-BF1B-44D4-86EF-D180A001F9CA.png) 21 | 22 | - Clustering 23 | - **Unsupervised** 24 | - No prior knowledge required 25 | - Grouping similar instances together without giving the labels of all the instances. 26 | - Regression 27 | - **Supervised** 28 | - Predicting a numeric quantity 29 | - A good regression is acceptably close to the true value 30 | - Association Learning 31 | - Detecting useful associations or structures between attribute values 32 | 33 | - We can use the new rule to infer an attributes values based on another 34 | 35 | 36 | 37 | ### Different Type of Attribute 38 | 1. Nominal Quantities (**Categorical**, discrete) 39 | 40 | - values are distinct symbols, theirs no relation between them 41 | 42 | - can only perform equality tests 43 | - **one-hot** is the most salient method to process categorical data 44 | 45 | 2. Ordinal Quantities 46 | 47 | - Explicit order in-between possible values but **no** numerical distances are defined 48 | 49 | 3. Continuous Quantities 50 | 51 | - Real-valued attributes with well-defined zero point and no upper bound 52 | 53 | - Numerical distances are defined between values 54 | 55 | - Allow all mathematical operations 56 | 57 | 58 | 59 | ### Real world problem and world flow 60 | 1. Data Wrangling 61 | 2. Different Data Representations 62 | - e.g. CSV, RAFF, etc 63 | 3. Missing Values 64 | - Sometimes the missing value maybe really important, for example medical examination. 65 | 4. Inaccurate Values 66 | - maybe caused by unintentional (bad sensor on a robot) or deliberate (wrong post codes) 67 | 5. May cause some ethical problem 68 | - race & sex in medical application: OK 69 | - in loan or student application selections: unethical -------------------------------------------------------------------------------- /ML/week10.md: -------------------------------------------------------------------------------- 1 | ### Neural Network 2 | 3 | - Neuron 4 | - input = a vector $x \in \R^n$ of numeric input 5 | - output = a scalar $a_i \in \R$ 6 | - hyper-parameter: an activation function f 7 | - parameter: a vector of weights $w =\ \ \in \R ^{n+1}$, one for each input plus a bias term 8 | - mathematically 9 | - $a_i=f(\textbf{w}\cdot x_i+b)$ 10 | - Update rule 11 | - $w_j \leftarrow w_j + \lambda(y_i - \hat{y}_i^k)x_{ij}$ 12 | - $i$ is the ith value for weight $j$ 13 | - Properties 14 | - Only guaranteed to converge for linearly-separable data 15 | - But depend on the initial point and learning rate 16 | - No guaranteed of convergence over non-linearly separable data 17 | - Possible to extend to multiclass classification problems in a similar manner to logistic regression 18 | - NN with single neuron and a sigmoid activation is equivalent to logistic regression 19 | - Activation Function 20 | - Sigmoid 21 | - $f(x)=\frac1{1+e^{-x}}$ 22 | - Range = [0,1] 23 | - Tanh 24 | - $f(x)=\frac{e^{2x}-1}{e^{2x}+1}$ 25 | - Range = [-1,1] 26 | - Rectified linear unit (ReLU) 27 | - $f(x) = max(0, x)$ 28 | - Not differentiable at x = 0 29 | 30 | - Multi-layer Perceptrons (MLP) 31 | - AKA fully-connected feed-forward neural network 32 | - input layer is made up of the individual features 33 | - hidden layer is made up an arbitrary number of neurons, each of which is connected to all neurons in the preceding layer, and all neurons in the following layer 34 | - output layer combines the inputs from the preceding layer into the output 35 | - Common Output Layer Activation Functions 36 | - two-class classification: one neuron with step function 37 | - multiclass classification: multiple perceptrons, with softmax 38 | - regression: identity function, sigmoid or tanh 39 | - Train NN with Hidden Layers 40 | - Using back propagation 41 | - compute errors at the output layer w.r.t. each weight using partial differentiation, then propagate those errors back to each of the input layers 42 | - NN in practice 43 | - Disadvantages 44 | - Long time to train, many parameters 45 | - Feature engineering less critical, it turns to be architecture engineering 46 | - Overfitting 47 | - L1/L2 regularisation over weights 48 | - early stopping 49 | - dropout units 50 | - Contain a number of random variables, hard to interpret 51 | - Advantages 52 | - Compact model, can be applied to both classification and regression. 53 | 54 | 55 | 56 | ### Deep Learning 57 | 58 | - Combination of “deep” models with sufficient data to train the model 59 | 60 | - One key facet of deep learning is **representation learning**, i.e. transformation of raw inputs into a suitable representation 61 | 62 | - Document representation 63 | - frequencies 64 | - Word embedding matrices 65 | - image representation 66 | - RGB pixels matrices 67 | - Grey scale matrices 68 | 69 | - Representation Learning 70 | 71 | - Embedding (dense real-valued vector) advantages 72 | - fewer features 73 | - Feature engineering easier 74 | - represent an instance by a combination of embeddings, allowing us to use the trained network for other problems 75 | - word2vec 76 | - continuous bag of words (CBOW) 77 | - for each word predict from its context words which ignore sequence 78 | - Nagative sampling is used to keep the word away which are not going to fit the original context 79 | - Simple feed-forward neural network (without a hidden layer), using logistic regression as the objective function 80 | 81 | - Convolutional Neural Networks 82 | 83 | - Staple of deep learning 84 | 85 | - Often use ReLU since 86 | 87 | 1. It is fast to differentiate 88 | 2. Tends to avoid the vanishing gradient problem 89 | 90 | - convolutional layers + max pooling layers + fully-connected layers 91 | 92 | - Deep convnets → ReLU activation function 93 | 94 | - fast to differentiate 95 | - tends to avoid the “vanishing gradient” problem 96 | 97 | - Convolution Layer 98 | 99 | - Kernel 100 | - overlaid on different sub-regions of the image, and combined through an element-wise product 101 | - Stride 102 | - defines how many positions in the image to advance the kernel on each iteration 103 | 104 | - Pooling 105 | 106 | - kernel and stride 107 | 108 | - maxpooling 109 | - Averagepooling 110 | 111 | - Deep Learning Overview 112 | 113 | - Advantage 114 | - Huge impact on vision and speech recognition tasks 115 | - Possible to model much larger contexts 116 | - Easy to combine different input modalities 117 | - Disadvantage 118 | - Cost in architecture engineering 119 | - Expensive to train on large dataset 120 | - Overblown claims about the capabilities of deep learning, hard to reproduce -------------------------------------------------------------------------------- /ML/week11.md: -------------------------------------------------------------------------------- 1 | ### Sequential Classification 2 | 3 | - Structured classification model 4 | 5 | - Able to capture the interaction between instances 6 | 7 | - Markov chain 8 | 9 | - ![image-20190616182727806](assets/image-20190616182727806.png) 10 | - Assumption 11 | - A state $q_i$ only depends on the immediately preceding state 12 | - $P(q_i|q_1…q_{i-1}) = P(q_i|q_{i-1})$ 13 | 14 | - Hidden Markov Models (HMM) 15 | 16 | - Different possibilities attached to each observation, rather than unique observation per state, which is we only see observations, but we want to evaluate hidden states. 17 | 18 | - ![image-20190616183252663](assets/image-20190616183252663.png) 19 | 20 | - Independence Assumption 21 | 22 | - $P(o_i|q_1,..,q_i,o_1,…,o_{i-1}) = P(o_i|q_i)$ 23 | 24 | - Foundation problems of HMM 25 | 26 | - Evaluation 27 | 28 | - Given an HMM $\mu$ and observation sequence $\Omega$ , determine the likelihood $P(\Omega|\mu)$ 29 | 30 | - Formulas 31 | 32 | - Probability of the state sequence Q 33 | - $P(Q|\mu) = \pi_{q1}a_{q_1q_2}a_{q_2q_3}…a_{q_{T-1}q_T}$ 34 | - Probability of observation sequence $\Omega $ for state sequence Q 35 | - $P(\Omega|Q,\mu)=\prod\limits^T_{t=1}P(o_t|q_t,\mu)$ 36 | - Probability of a given observation sequence $\Omega$ 37 | - $P(\Omega|\mu)=\sum\limits_QP(\Omega|Q,\mu)P(Q|\mu)$ 38 | 39 | - The **Forward Algorithm** 40 | 41 | - Efficient computation of total probability through DP 42 | - ![image-20190616185026505](assets/image-20190616185026505.png) 43 | - If we have $\mu$ as 44 | - ![image-20190616185226462](assets/image-20190616185226462.png) 45 | - Then the probability of 3 solo, 3 solo and 1 solo are calculated as 46 | - ![image-20190616185336007](assets/image-20190616185336007.png) 47 | 48 | - **Backwards algorithms**: similar to forward 49 | 50 | - | | T = 3 | T = 2 | T = 1 | 51 | | :-------------: | :---: | :--------------------------: | :-------------------------------: | 52 | | $\beta_t(hot) $ | 1 | 0.7x1x0.05+0.3x1x0.75 = 0.26 | 0.7x0.26x0.8+0.3x0.68x0.1 = 0.166 | 53 | | $\beta_t(code)$ | 1 | 0.1x1x0.05+0.9x1x0.75 = 0.68 | 0.1x0.26x0.8+0.9x0.68x0.1 = 0.082 | 54 | 55 | - $P(\text{3 solos, 3 solos, 1 solo}|\mu)=0.5*0.166*0.8+0.5*0.082*0.1\\=0.0705$ 56 | 57 | - Decoding 58 | 59 | - Given an HMM $\mu$ and observation sequence $\Omega $, determine the most probable hidden state sequence Q 60 | - Example: given 3-Solos, 3-Solos, 1-Solo, what is the most probable weather sequence? 61 | - **Viterbi Algorithm** 62 | - ![image-20190616192949382](assets/image-20190616192949382.png) 63 | - Where $\psi$ represent the previous state which could be used for backtrace 64 | 65 | - Learning 66 | 67 | - Given an observation sequence $\Omega $ and the set of possible states S and observations O in an HMM, learn the HMM parameters. 68 | - We could learn using supervised learning (MLE) which based on frequency and unsupervised fashion using (EM) 69 | 70 | - Overview 71 | 72 | - Highly efficient approach to structured classification, but limited representation of context 73 | - As with NB, HMM tends to suffer from floating point underflow 74 | - Use logs for Viterbi 75 | - Use scaling coefficients for Forward Algorithm 76 | - As with most generative models, it's hard to add ad hoc feature 77 | 78 | - Other structured classifiers 79 | 80 | - Maximum entropy markov models 81 | - Logistic regression model where we also condition on the observation 82 | - Possible to add extra features can capture the tag interactions 83 | - Conditional random fields 84 | - Extension of logistic regression where we optimise over the full tag sequence -------------------------------------------------------------------------------- /ML/week2.md: -------------------------------------------------------------------------------- 1 | ### Entropy 2 | 3 | - A measure of unpredictability 4 | - H(X) = $-\sum_{i=1}^{n}P(x_i)log_2P(x_i)$ 5 | - where we define $0\log_20=0$ 6 | - $P$ is the probability that $x_i$ occur, it is the frequency for most of the case. 7 | - The range of the entropy value is **not** [0,1] 8 | - $0 \leq Entropy \leq log(n)$, where n is the number of outcomes 9 | - 0 is a single event with probability 1, others are 0 10 | - log(n) uniform probability distribution which is each has $\frac{1}{n}$ 11 | 12 | 13 | 14 | ### IG (information gain) 15 | 16 | - Parent entropy - weighted child entropy 17 | 18 | ![image-20190319000158230](assets/image-20190319000158230.png) 19 | 20 | 21 | 22 | ### Model 23 | 24 | - Abstract representation of data 25 | 26 | - Probability Model 27 | - we normally don’t know the probability so we have to estimate based on the incoming informations 28 | 29 | 30 | 31 | ### Naive Bayes 32 | 33 | - Supervised machine learning algorithms 34 | - Based on the Bayes Rule, for a given instance X with features $x^i$ ($i$ = 1…n) 35 | - We want 36 | - $argmax\ P(Y=c_k|X=x^i) $ 37 | - Now we have 38 | - $P(Y=c_k|X_1=x_1, X_2=x_2…)$ 39 | - Based on Bayes rule 40 | - $P(Y=c_k|X_1=x_1, X_2=x_2…)=\frac{P(X_1=x_1,X_2=x_2…|Y=c_k) P(Y=c_k)}{P(X_1=x_1,X_2=x_2…)}$ 41 | - The denominator won't affect our result (since we only care who is the largest one), we can simply ignore that, then the equation becomes 42 | - $P(Y=c_k|X_1=x_1, X_2=x_2…) \propto P(X_1=x_1,X_2=x_2…|Y=c_k) P(Y=c_k)$ 43 | - Assumption 44 | - All of the features are independent. 45 | - We might increase our error rate, but we reduce the complexity of the problem dramatically. 46 | - If the features are connected really closely, the premise for NB does not exist. Thus, the result will have a high error rate. 47 | - $P(Y=c_k)$ can be estimated using MLE or Bayesian estimate. 48 | - There is no big difference in distribution between training instance and testing instance. 49 | 50 | - Smoothing 51 | - Why? 52 | - If the incoming instance has a feature that we haven't seen in the training set, we might get a 0 probability as a bad result. 53 | - However, nothing is 100% impossible. 54 | - How? 55 | - Epsilon ($\epsilon$) smoothing 56 | - Replace all the 0 with a $\epsilon$ which is a number which greater than 0 but smaller than $\frac{1}{n}$ (preferably). 57 | - Assume $1+\epsilon \approx 1$ 58 | - Reduce the problem to the cardinality of $\epsilon$ 59 | - Laplace smoothing (add 1 smoothing) 60 | - $\hat{P}(X_i=x_i|Y=c_k) = \frac{\sum_i I(X_i=x_i,Y=c_k) + \lambda}{\sum I(Y=c_k) + n\lambda}$ Where n is the number of different attributes. 61 | - This equation comes from the combination of beta distribution (prior) and binomial distribution (posterior) which use the idea of Bayes estimation. 62 | - Normally we set $\lambda$ to 1, but it actually can be any number. 63 | - It is known to systematically over-estimate the likelihood of unseen events, creating bias in certain circumstances. 64 | - When the training set are **small**. 65 | - Other choice 66 | - Add-k smoothing: set $\lambda$ to any integer which larger than one. 67 | - Regression 68 | - Good-Turing estimation 69 | - Which one is better? 70 | - Normally Laplace may perform better, but overall it depends on the data. 71 | - Missing value 72 | - Ignore it in both training and testing dataset. 73 | - Advantages of NB 74 | - Simple, fast prediction. 75 | - Works well in many application areas, no hash restriction 76 | - Scales easily for large number of dimensions and data size 77 | - Decent interpretability 78 | - No need of exactly value of $P(Y=c_k|X_i=x_i)$, since we only care about which one is better. 79 | - Relative robust to two common type of errors: 80 | - ==Over-estimated some $P(Y=c_k|X_i=x_i)$, but we have under-estimated others. Overall, we tends to under-estimate overall probability.== 81 | - ==Some marginally-relevant attributes are correlated== 82 | - In practical 83 | - To prevent under-flow, we can use the log-transformation, which the final equation becomes 84 | - $argmax\ P(Y=c_k)\prod_i P(X_i=x_i|Y=c_k) = argmax[log(P(Y=c_k)) + \sum_ilog(P(X_i=x_i|Y=c_k))]$ 85 | -------------------------------------------------------------------------------- /ML/week6.md: -------------------------------------------------------------------------------- 1 | ### Hyper-parameter Optimisation 2 | 3 | - $\hat{\theta^h}=\arg\min_{\theta^h\in\Theta}Error(\theta^h;\mathcal{L},\mathcal{F}(\mathcal{T}))$ 4 | - Where $\mathcal{T}$ is a dataset, a feature representation $\mathcal{F}(\mathcal{T})$, a learner $\mathcal{L}$ with hyper-parameters $\theta^h$ 5 | - Analytic solution 6 | - derivatives 7 | - Requires solving $\frac{\partial(Error)}{\partial\theta_i} $ 8 | - Whereas, derivatives are not defined. 9 | - Grid Search 10 | - Indentify boundaries for hyper-parameter 11 | - Divide range into steps 12 | - Exhaustively search the space and find best score 13 | - Hyper-parameter Tuning should avoid overfitting 14 | 15 | 16 | 17 | ### Regression 18 | 19 | - Assuming linear relationship between the k attribute values $a_i$ and the numeric output c 20 | 21 | - $c = w_0 + \sum\limits^{k}_{i=0}w_ia_i \\ \text{where } w_i \text{ is a weight corresponding to } a_i$ 22 | 23 | - Fitting the model 24 | 25 | - **Least squares estimation** which minimise the Residual Sum of Squares 26 | - $RSS(\beta)=\sum\limits_i(y_i-\hat{y_i})^2 \\\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }=\sum\limits_i(y_i-\beta x_i)^2 \\\text{Notice that RSS is convex}$ 27 | - Set derivatives of RSS, w.r.t weight vector $\beta $, for n instances, and D distribution to 0 and solve unknowns 28 | - Gradient Descent 29 | - $\beta_k^{i+1}:=\beta_k^i+2\alpha\sum\limits^N_{j=1}x_{jk}(y_j-\hat{y_j^i})$ 30 | - The gradient points up-hill, we follow it down-hill. Each update reduces the error slightly 31 | - Learning rate $\alpha$ 32 | - Small is slow 33 | - Large might miss minimum and never converge 34 | 35 | - Evaluation of Numeric Prediction 36 | 37 | - Mean squared error 38 | - $MSE =\frac1N\sum\limits_i(\hat{y_i}-y_i)^2$ 39 | - Root mean-squared error (RMSE) 40 | - RMSE=$\sqrt{MSE}$ 41 | - Root relative squared error (RRSE) 42 | - $RRSE=\sqrt{\frac{\sum_i(\hat{y_i}-y_i)^2}{\sum_i(y_i-\bar{y})^2}},\text{where }\bar{y}=\frac{\sum_i{y_i}}N $ 43 | - Person's correlation (statistical correlation between predicted and actual values) 44 | - ![image-20190614231111970](assets/image-20190614231111970.png) 45 | 46 | 47 | 48 | 49 | 50 | ### Logistic regression 51 | 52 | - It is a **linear** classification algorithms. 53 | 54 | - Works well when data is linear separable. 55 | 56 | - Output is the probability of a class 57 | 58 | - Logit 59 | 60 | - $logit(P)=\log\frac{P}{1-P} \\ logit(1-P)=-logit(P)$ 61 | 62 | - Use **logistic function (sigmoid)** to make sure the probability is smooth and in range of [0,1] 63 | 64 | - $logitP(c|\textbf{x})=log\frac{P(c|\textbf{x})}{1-P(c|\textbf{x})}=\beta_0+\beta_1x_1+...+\beta_Dx_D$ 65 | - $P(c|x) = \frac{1}{1+e^{-(\beta x)}} = h_\beta(x)$ 66 | - Where $\beta x$ is the results of log linear regression 67 | - ![image-20190614234204923](assets/image-20190614234204923.png) 68 | 69 | - Compare NB and LR 70 | 71 | - In NB, we are trying to maximize $P(x_i|c_j)$ 72 | - In logistic regression we model $P(c_j|x_1,x_2,…,x_D)$ directly 73 | 74 | - Using gradient descent to learn the $\beta$ 75 | 76 | - We want the probability belongs to one class to be 1 and the other to be 0 77 | - In this case, we have the likelihood function 78 | - $P(Y|X;\beta) = \prod\limits^{N}_{I=1}(h_\beta(x_i))^{y_i} * (1-h_\beta(x_i))^{1-y_i}$ 79 | - Where $y_i$ can only take 0 or 1 to indicate which class it belongs to 80 | - This is a Bernoulli distribution 81 | - Take log of it and use **gradient ascent** to maximize it 82 | 83 | - LR for multi-class problem 84 | 85 | - Chose any class to be pivot, so that we can conclude linear relation between different class. 86 | - Which is 87 | - $log\frac{P(A|x)}{P(C|x)} = \beta_A*x$ 88 | - The larger the fraction, the more likely the instance belongs to non-pivot (Class A), the smaller the value, the more likely the instance belongs to pivot (Class B). 89 | - $P(A|x) = P(C|x) * exp(\beta_A *x)$ 90 | - Similar for $P(B|x)$ 91 | - $P(A|x) + P(B|x) + P(C|x) = 1$ 92 | - Probability of all class sum to 1 93 | - $P(A|x) = \frac{1}{1+\sum\limits_{k \in A,B} -e^{\beta*x}}$ 94 | - Therefore, we could express all other class in terms of all other class. 95 | - Make sure they sum to 1 96 | - $P(y=j|x;\beta)=\frac{\exp(\beta_jx)}{1+\sum_{k=1}^{|C|-1}\exp(\beta_kx)}$ 97 | - Probability of “pivot” class has 1 in the numerator 98 | - Log-linear probabilities need to subtract a normalising term for softmax 99 | - $Z_i=\sum_{k=1}^{|C|}e^{\beta_kx_i}$ 100 | 101 | 102 | 103 | ### Overview of Logistic Regression 104 | 105 | - Pros 106 | - Vast improvement on Naive Bayes 107 | - Particularly suited to frequency-based features 108 | - Cons 109 | - Slow to train 110 | - Some feature scaling issues 111 | - Often needs a lot of data to work well 112 | - Need regularisation to avoid overfitting 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /ML/week8.md: -------------------------------------------------------------------------------- 1 | ### Interpreting Models 2 | 3 | - Error analysis 4 | - Identify different classes of error 5 | - guess what has caused the different errors, and feedback to model for improvement 6 | - Model interpretability 7 | - We can interpret the basis of a given model classifying an instance the way it does 8 | - Hyperparameters 9 | - Parameters which define/bias/constrain the learning process 10 | - Parameters 11 | - What is learned when a given learner with a given set of hyperparameters is applied to a particular training dataset 12 | - Nearest Neighbour 13 | - Hyper 14 | - k (neighbourhood size) 15 | - Distance/similarity metric 16 | - Feature weighting/selection 17 | - Parameters 18 | - None, lazy model 19 | - Interpretation 20 | - Relative to the training instances that vie rise to a given classification, and their geometric distribution. 21 | - Nearest Prototype 22 | - Hyper 23 | - distance/similarity metric 24 | - feature weighting/selection 25 | - Param 26 | - prototype 27 | - size = $O(|C|*|F|)$ 28 | - C = set of classes 29 | - F = set of features 30 | - Interpretation 31 | - relative to the geometric distribution of the prototypes, and distance to each for a given test instance 32 | - Naive Bayes 33 | - Hyper 34 | - smoothing method 35 | - choice of distribution (MNB, BNB...) 36 | - Param 37 | - class priors and conditional probability 38 | - size = O(|C| + |C| * |FV|) 39 | - C = set of class 40 | - FV = set of feature–value pairs 41 | - Interpretation 42 | - most positively-weighted features associated with a given instance 43 | - Decision Trees 44 | - Hyper 45 | - choice of function used for attribute selection 46 | - convergence criterion 47 | - Param 48 | - decision tree itself 49 | - size = O(|FV|), worst case size = O(V|Tr|) 50 | - V = average branching factor 51 | - Tr = set of training instances 52 | - FV = set of feature-value pairs 53 | - Interpretation 54 | - based on path 55 | - Support Vector Machines 56 | - Hyper 57 | - penalty term C/$\epsilon $ for soft-margin 58 | - feature value scaling 59 | - choice of kernel 60 | - Param 61 | - vector of feature weights + bias term 62 | - one-vs-rest SVM - size = O(|C|*|F|) 63 | - C = set of classes 64 | - F = set of features 65 | - Interpretation 66 | - absolute value of the weight associated with each non-zero feature in a given instance provides an indication of its relative importance in classification 67 | 68 | 69 | 70 | ### Dimensionality reduction 71 | 72 | - Reduce features space to 2 or 3 dimension so that it could be more easily visualised. 73 | - Principal Component Analysis (PCA) 74 | - Reduce the dimensionality consisting of a large number of interrelated variables, while retaining as much as possible of the variation. -------------------------------------------------------------------------------- /ML/week9.md: -------------------------------------------------------------------------------- 1 | > **Overfitting**: the classifier works well on training set but really bad on evaluation set 2 | > 3 | > **Consistency**: classifier able to flawlessly predict the class of all training instance 4 | > 5 | > **Generalisation**: how well does the classifier generalise from the specifics of the training example to predict the target function 6 | 7 | 8 | 9 | ### Factors to consider 10 | 11 | - Overfitting 12 | - Plot learning curves based on split sizes 13 | - If hold-out is used 14 | - Trade-off between more training instances and more evaluation instances (more reliable estimate of effectiveness) 15 | - Generalisation 16 | - A good model should fit the training data well, and generalise well to unseen data 17 | - The expectation is that training and test data are randomly selected from the same population, but neither are the entire population. 18 | - Possible evidences of overfitting 19 | - Decision boundary distorted by noice 20 | - ![image-20190616125346785](assets/image-20190616125346785.png) 21 | - Could be due to small numbers of examples 22 | - Could be due to non-randomness in training sample (sample bias) 23 | 24 | 25 | 26 | ### Model Bias and Variance 27 | 28 | - Model bias 29 | - Classifier makes systematically wrong predictions 30 | - Sampling bias 31 | - Training or evaluation dataset isn't representative of the population 32 | - Model variance 33 | - Different training sets to produce different model/predictions with the same learner 34 | - High bias and high variance are often bad, but low bias and low variance are no guarantee of good 35 | - Low bias 36 | - Weighted random classifier 37 | - Low variance (zero variance) 38 | - 0-R 39 | 40 | 41 | 42 | ### Evaluation Bias and Variance 43 | 44 | - Evaluation bias 45 | - Evaluation strategy to over or under estimate the **effectiveness** of our classifier 46 | - Evaluation variance 47 | - Our estimate of the **effectiveness** of a model changes a lot as we alter the instances in the evaluation set. 48 | - Difference between evaluation bias and model bias 49 | - Whether we need to compare with external labeled data. 50 | - Control evaluation basis and variance 51 | - Holdout partition size 52 | - More training data: less model variance, more evaluation variance 53 | - Repeated random subsampling and K-fold Cross-Validation 54 | - Stratification 55 | - less model bias 56 | - Leave-one-out Cross-Validation 57 | - No possibility of sampling bias, lowest bias/variance in general -------------------------------------------------------------------------------- /Machine Learning — Coursera/README.md: -------------------------------------------------------------------------------- 1 | ### Normal Equation for Linear Regression 2 | 3 | - $\theta = (X^TX)^{-1} X^Ty$ 4 | 5 | - With regularization term 6 | 7 | - ![image-20190709115511594](assets/image-20190709115511594.png) 8 | 9 | - Derived by linear algebra 10 | 11 | - Where x is a matrices of features 12 | 13 | - ![image-20190707125915022](assets/image-20190707125915022.png) 14 | 15 | - y is a matrix of target values 16 | 17 | - Comparing GD and normal equation, assume **m** training examples and **n** features 18 | 19 | - | GD | NE | 20 | | ------------------------------------- | ------------------------------------------------------------ | 21 | | Need to choose $\alpha$ | No need to choose $\alpha$ (better) | 22 | | Needs many iterations | Don't need to iterate (better) | 23 | | Works well even with large n (better) | Low if n is very large since the cost of calculating $(X^TX)^{-1}$ is huge $O(n^3)$ | 24 | 25 | - Problem — $X^TX$ might be non-invertible (singular), it may caused by 26 | 27 | - Redundant features — features are linearly dependent 28 | - $x_1$ = size in feet^2^ 29 | - $x_2$ = size in m^2^ 30 | - Too many features (m $\ll$ n) 31 | - Delete some features 32 | - Use regularization 33 | 34 | 35 | 36 | ### Classification 37 | 38 | - Why Linear Regression is not a good idea 39 | - Some extreme data will significantly shift the threshold, which could predict something right to the wrong side 40 | - ![image-20190707140422585](assets/image-20190707140422585.png) 41 | 42 | - Logistic Regression 43 | - Interpretations 44 | - The probability of the event $\theta$ 45 | - $P(Y=0|x;\theta) + P(Y=1|x;\theta) = 1$ 46 | - When making predictions 47 | - $z = \theta^Tx$ is linear regression 48 | - $g(z) \geq 0.5 \implies z \geq 0$ 49 | - Where g is the logistic(sigmoid) function 50 | - $g(z) \leq 0.5 \implies z \leq 0$ 51 | - How decision boundary are made 52 | - ![image-20190707160613809](assets/image-20190707160613809.png) 53 | - Non-Linear decision boundaries 54 | - Just use hight order new features, e.g. add $x^2$ as a new features, where we could get a non-linear decision boundary 55 | - ![image-20190707160949466](assets/image-20190707160949466.png) 56 | - Or we could use a combination of different features to come up with some more complicated decision boundaries 57 | - e.g. $x_1x_2$, $x_1x_2^2$ as new features 58 | - Cost function 59 | - MSE are non-convex for logistic regression 60 | - If y = 1 61 | - $Cost(h_\theta(x), y) = -log(h_\theta(x))$ 62 | - If y = 0 63 | - $Cost(h_\theta(x), y) = -log(1-h_\theta(x))$ 64 | - Combine 65 | - $Cost(h_\theta(x), y) = -y\ log(h_\theta(x)) - (1-y)log(1-h_\theta(x))$ 66 | - Which is identical to above two 67 | - Update rule are same as Linear regression (surprise) 68 | - ![image-20190707231553907](assets/image-20190707231553907.png) 69 | 70 | 71 | 72 | ### Advanced Optimization Algorithms 73 | 74 | - Conjugate gradient 75 | - BFGS 76 | - L-BFGS 77 | - Pros 78 | - No need to manually pick $\alpha$ 79 | - Often faster than gradient descent 80 | - Cons 81 | - More complex 82 | 83 | 84 | 85 | 86 | 87 | ### PCA 88 | 89 | - Reduce from n-dimension to k-dimension 90 | - Find $k$ vectors onto which to project the data, so as to minimize the **projection error**. 91 | - Whereas, Linear Regression is trying to minimise the distance between the prediction and real value. -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/gif.latex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/gif.latex -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190707125915022.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190707125915022.png -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190707140422585.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190707140422585.png -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190707160613809.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190707160613809.png -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190707160949466.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190707160949466.png -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190707231553907.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190707231553907.png -------------------------------------------------------------------------------- /Machine Learning — Coursera/assets/image-20190709115511594.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/Machine Learning — Coursera/assets/image-20190709115511594.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UniPublic 2 | Uni related public resources and notes. 3 | 4 | Notice that all the notes including Math equation were written in and supported by Typora (cross platform). 5 | 6 | 7 | 8 | Highly recommend using Typora to read the notes for the best experience and make sure you enable all the syntax support. 9 | 10 | ![image-20190409142940855](assets/image-20190409142940855.png) 11 | 12 | --- 13 | 14 | There is also a work around for the Latex rendering in github if using the doc online is more preferrable, which a Google Chrome plugin may help on this. 15 | https://chrome.google.com/webstore/detail/mathjax-plugin-for-github/ioemnmodlmafdkllaclgeombjnmnbima/related 16 | -------------------------------------------------------------------------------- /assets/image-20190409142940855.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siriusctrl/UniPublic/9df7f8bb9d1209de2af8ac4b5f57ada38587ad50/assets/image-20190409142940855.png --------------------------------------------------------------------------------