代做Engineering Al Agents ASSIGNMENT 1调试Python程序

Engineering Al Agents

ASSIGNMENT1

In this assignment you will be working on setting up your system and refreshing basic probability theory or basic linear algebra concepts.You are mandated to use the Pytorch namespace libraries such as pytorch.linalg,pytorch.rand and in general libraries in the pytorch.xyz namespace but not any derived or any other libraries (but you can use plotting libraries such as plotly or matplotlib).The idea is to implement from scratch the following without implementing every minute component such as random number generators etc.

Points:

·Dev  Environnment:20  points

·Information    Theory:20    points

·MLE:30       points

·Linear    Regression:30    points 

General Instructions

1.We need to see a clear explanation of all the stages of developing the solutions which means that you need to explain the code in a way that the writeup is understood by others such as in a tutorial.Obviously this does not apply to mechanical tasks scuh as setting up your development  environment.

2.Type inline with your notebook code your tutorial explanations.Equations can be typed in markdown using Latex syntax notation.If you prefer plain Python you can also include markdown as a separate file but you do need to ensure that all plots are inline to that markdown document and are parsed correctly by Github.

3.Submit in the learning management system of your school(Canvas,Brightspace etc.) following the instructions in your course site (under resources).You submit a private Github repo URL with a README therein that points to the notebook of each assignment.Each notebook must have its output saved.

4.Students  that  havent  changedtheir  nickname  in  the  Discord  Back2classroom  server  to    "Firstname  Lastname"will  get  a  10  point  penalty.To grade your assignment  include  in the README of your repo a screenshot of your Discord profile page.

Development Environment Setup

Ubuntu and MAC users

Install docker in your system and the VSCode docker and remote extensions.

Windows users

1.Install WSL2.

2.Ensure that you also follow this tutorial to setup VSCode properly aka the VSCode can access the WSL2 filesystem and work with the remote docker containers.

3.If you have an NVIDIA GPU in your system,ensure you have enabled it.

AlI Users

Following the instructions of the course site with respect to the course docker container

1.Install docker on your machine.

2.Clone the repo(For windows users ensure that you clone it on the WSL2 filesystem.)Show this by a screenshot below of the terminal where you have cloned the repo.

3.Build and launch the docker container inside your desired IDE (if you havent used an IDE before you can start with VSCode).

4.Launch the virtual environment with rye sync inside the container and then show a screenshot of your IDE and the terminal with the (your virtual   env) prefix.

5.Select the kernel of your virtual environment(.venv folder)and execute the following code. Save the output of all cells of this notebook before submitting.

Source:Development  Environment  Setup

Information Theory Basics

Information theory was introduced by Claude Shannon in 1948.It is a mathematical theory that deals with the transmission,processing,utilization,and extraction of information.It has given rise to a wide range of applications,including data compression,cryptography,error correction and   fueled other industries such as Al,cellular communications and others.

Using this reference,that you need to study before answering the following question,let(x,y) have the following joint distribution:

If H is the symbol for the entropy functional,answer quantitatively showing your calculations

a.Is H(x|y)=H(y|x)?

b.Is H(x)-H(x|y)=H(y)-H(y|x)? 

c.Calculate the  mutual  information  I(x,y).

Source:Information Theory Basics

Maximum Likelihood Parameter Estimation

What is the exponential distribution?

The exponential distribution is a probability distribution that describes time between events in a Poisson process.There is a strong relationship between the Poisson distribution and the Exponential distribution.

Let's say that you try to model the number of api calls(arrivals)per second towards an LLM inference server.Arrivals per second has a Poisson distribution with arrival rate 100,which means that 100 api calls are made per second."The expected mean inter-arrival time is 0.05 seconds,because an api can be expected every 0.05 seconds.The inter-arrival process is modeled by the exponential distribution.The units for the Poisson process are api calls and the units for the exponential are seconds.

Videos that may help you understand these distributions:

Task  1

Simulate the interarrival times using an exponential distribution with the rate parameter λ=100

Task  2

Use the stochastic gradient descent(SGD)algorithm to minimize the negative log-likelihood of the exponential distribution.Output:(a)the estimated parameter after a number of iterations of your choice and (b)plot the value of objective function over the iteration index.

Source:Maximum  Likelihood  Parameter  Estimation

Linear Regression and SGD

In class we covered the baseline stochastic gradient descent.Using the linear regression  dataset from the class website,develop from scratch the baseline SGD algorithm that can estimate the L2-norm regularized model.

Clearly state the hyper-parameters you used and present the loss vs epoch plot that demonstrates the convergence of the algorithm and the final values of the parameters w of the model.

You can generate the dataset with any number of examples m you need to demonstrate that the algorithm works.

Source:Linear Regression and SGD

 


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图