10年專注于英語國家留學生作業代寫,網課代修,網課Exam代考
 Python代做_作業代寫_python代考_DueEssay論文代寫

Python代做_作業代寫_python代考

python代寫, python代做 ,python編程代寫,python程序代寫, UKXIE 旗下寫手均來自國內外名校碩博及一線互聯網公司。C++代寫,python代寫,java代寫,機器學習代寫,數據庫代寫,R語言..

2957088488

Python代做_作業代寫_python代考

發布時間:2021-12-04 熱度:

python代寫,python代做,python編程代寫,python程序代寫,唯一網址:hdassignmenthelp.com旗下寫手均來自國內外名校碩博及一線互聯網公司。C++代寫,python代寫,java代寫,機器學習代寫,數據庫代寫,R語言代寫,CS代寫全覆蓋。

北美學霸,國內985碩博成員,全公司化管理,高素質、高紀律、高效率。其他個人團體網絡接單不可控性很大,無保障,很可能因私人原因錯過due,帶來不可彌補損失。

我們最基本的原則是必須保證honor code,必須保證原創。我們的留學生CS作業代寫服務嚴格參考客戶提供的slide和學業水平,杜絕超綱代碼。有test的必全過,requirements必做,Bonus按照客戶要求盡全力完成。我們的留學生CS編程作業代寫同時會提供一對一遠程服務,保證作業的順利上交。客戶的滿意度是衡量團隊工程師能否繼續留在團隊的唯一標準,團隊大牛們也不屑于抄襲代碼.

提供專屬的CS程序代寫服務,代寫各類程序語言:代做程序,C語言代寫, C++代寫, 算法作業代寫, 數據結構代寫, AI/MachineLearning代寫, python代寫, java代寫, matlab代寫, 匯編代寫, scala代寫, SQL/Database代寫, racket代寫, 安卓/Android代寫, IOS/swift代寫, racket代寫, 網絡代寫, web代寫, OS/操作系統代寫, R代寫等, 涵蓋北美CS代寫, 加拿大CS代寫, 美國CS代寫, 澳洲CS代寫, 新西蘭CS代寫, 英國CS代寫, 新加坡代寫, 香港CS代寫等.

CS代寫、計算機作業代寫,java代寫,python代寫,c/c++代寫
Project代寫

Homework代寫

Lab代寫

C/C++ 編程代寫

CS作業代寫

Data Mining數據挖掘作業代寫

數據結構 Data Structure作業代寫

Database Mongodb postgreSql mysql Nosql SQL代寫

AI作業代寫 人工智能代做

Machine learning 作業代寫 機器學習代寫

Operating System 操作系統作業代寫

EE 作業代寫

編程作業代寫

Java代寫 Java程序代寫

Linux C/C++作業代寫

Python代寫 Python程序代寫

Web開發 網站設計 php程序代寫/nodejs/css/html5/reactjs/vue等

算法實現 算法作業代寫

數據分析 R代寫 R語言代寫 統計代寫

安卓代寫 移動開發

IOS代寫 移動開發


Please read the entire PDF before starting. You must do this assignment individually.

It is very important that you follow the directions as closely as possible. The directions, while

perhaps tedious, are designed to make it as easy as possible for the TAs to mark the assignments by letting

them run your assignment, in some cases through automated tests. Following closely the instructions will

allow the TAs to provide better feedback and not waste time on administrative details. Plus, if the TA is

in a good mood while he or she is grading, then that increases the chance of them giving out partial marks.

:)

To get full marks, you must:

? Follow all directions below

? Code your solution using the template provided in mycourses.

? Make sure that your code compiles and it is correct.

– Non-compiling code (code with syntax error) will receive a very low mark

? Write your name and student number in a comment in each .py file you hand in

? Indent your code properly

? Name your variables appropriately

– The purpose of each variable should be obvious from the name

– Use a docstring in each function to comment and validate your program

? Submit your code in codePost

– Make sure that your code passes the given test cases.

1

Part 0

Before starting the assignment, it is important that you complete the following steps. These steps are

optional (and will not be graded), but we highly recommend you to go through them.

? For this assignment, we will use the online platform called codePost to facilitate the automatic grade

of your work and to provide high-qualilty feedback on your programming work. The following are the

basic steps that you will have to perform in codePost.

1. Accessing and Signing up codePost: Please make sure that you can access codePost. In

order to login, you must use the link in the content section of the “Resources” tab located in

mycourses. Please fully review this link to get extra information about this task. http://help.

codepost.io/en/articles/3655946-student-signup-instructions

2. Submitting work to codePost: Once you have finished the coding part of the assignment, you

will need to upload your .py file to codePost. Please fully review this link to get extra information

about this task.

http://help.codepost.io/en/articles/3851633-how-can-i-submit-work-to-codepost.

If you need information about how to re-submit your work, please fully review this link to get

extra information about this task.

http://help.codepost.io/en/articles/3734695-can-i-resubmit.

For this assignment, you will be able to receive automated test results with your submission.

Please double check that your code passes all the test cases. Finally, and in order to have

peace of mind, you can check if your submission went through codePost, please fully review

this link to get extra information about this task. http://help.codepost.io/en/articles/

3734625-how-can-i-tell-if-my-submission-worked

Part 1

The questions in this part of the assignment will be graded.

During this week lecture, we studied how to solve a system of linear equations through a method called

Gauss-Jordan elimination. This method involves common operations on matrices (i.e., stacking a matrix,

elementary row operations [row swap, scalar multiplication, row addition]). In this assignment, we will study

a highly related method that is based on finding the inverse of a matrix. A system of linear equations can

be written as AX = B where A is the coefficient matrix, X is a column vector containing the variables, and

B is the right hand side. If AX = B, then X = A?1B, where A?1

represents the inverse of A (see below for

the operations performed to obtain this result).

AX = B .... initial statement

A?1

(AX) = A?1

(B) .... pre-multiply both sides by A?1

(A?1A)X = A?1B .... use the associative property to regroup factors

IX = A?1B .... when you multiply inverses together, they become the identity matrix

X = A?1B .... the identity matrix is like multiplying by 1.

Finding the inverse of a matrix is not only important to solve systems of linear equations, but it represents an

extremely important concept used in a huge variety of applications to model physical systems and engineering

models. You must be aware that numpy and/or scipy could be used to solve many numeric computing

problems. Actually, this assignment could be easily solved using this modules; however, you are not allowed

to use those modules (or any other module). This assignment is about understanding the implementation

principles to be able in a future to know how to apply them. Remember what was mentioned during the

lectures, libraries are good because they make it so easy to program, but they are bad because I will never

know how to do that myself. Then, lets do this assignment without the help of the libraries.

Page 2

Solving a system of linear equations by computing the inverse

The Gauss-Jordan elimination method (seen during the recording lecture video) can be used to determine a

matrix inverse (only possible for a square matrix with non-zero determinant). The main idea is that we will

now perform a sequence of row transformations (i.e., interchange of rows, multiply a row by a constant, add

a multiple of one row to another) to transform the matrix A to the identity matrix (i.e., a square matrix

with ones on the main diagonal and zeros elesewhere) and simultaneously perform the same sequence of

operations on the identity matrix I (we can do that by creating an augmented matrix M = [A|I] between A

and the identity matrix I).

Then, it is clear that to find the inverse (and to solve the equation X = A?1B) we will need the following

functions

? A multiplication method to multiply two matrices (i.e., to compute A?1B).

? A stacking method to obtain an augmented matrix (e.g., in the recording lecture video we computed

the augmented matrix M = [A|b] by stacking b as the last column to the matrix A)

? An un stacking method to extract the stacking matrix from the augmented matrix (e.g., following the

example shown in the recording lecture video, this method must return (extract) b from the augmented

matrix M = [A|b])

? A gauss jordan method that implements the elementary row operations to convert an augmented

matrix into a row-echelon form.

? An inverse method that calls the other methods to compute the inverse of a matrix

As mentioned before, the objective of this assignment is to implement the above-mentioned functions without

the help of (numerical computation) libraries such as numpy and scipy.

Question 1: multiplication (12 points)

The method called multiplication takes two Matrix objects as input and returns a new Matrix object

representing the multiplication of the two input matrices. if X is an m × n matrix and Y is an n × p

matrix, their matrix product XY is an m × p matrix, in which the n entries across a row of X are

multiplied with the n entries down a column of Y and summed to produce an entry of AB.

The following is a view of how the function looks in the Matrix.py file.

def multiplication(self, other):

’’’Returns a new Matrix object with the result of the matrix multiplication between

self.matrix and other.matrix

pre-req: self.num_columns == other.num_rows

’’’

"""

For this method you can safely assume that self.num columns == other.num rows (i.e., the multiplication

can always be computed); however you can not assume that self.num rows == other.num rows

(i.e., both matrices have the same dimensions).

Page 3

Question 2: stacking (12 points)

Complete the stacking function, which takes two Matrix objects as input and returns a new Matrix

object representing the augmented matrix of the inputs (i.e., it stacks the matrix of the second parameter

at the end to the matrix of the first parameter). if X is an m × n matrix and Y is an m × n matrix,

the augmented matrix M = [X|Y ] is an m × (2n) matrix,

The following is a view of how the function looks in the Matrix.py file.

def stacking(self, other):

’’’Returns a new Matrix object that represent the augmented matrix between self.matrix

and other.matrix

pre-req: self.num_rows == other.num_rows and self.num_columns == other.num_columns and

self.num_rows == self.num_columns

’’’

For this method you can safely assume that the matrices of both input objects have the same dimensions

(i.e., self.num rows == other.num rows and self.num columns == other.num columns).

Furthermore, both square matrices are square matrices (i.e., self.num rows == self.num columns). These

pre-requisite is very important because it differs from the stacking method of the recorded video lecture.

Please remember that in the video we stacked the vector b as the last column of the matrix A. Here,

for this assignment (and in order to compute the inverse of the matrix), we need to stack the identity

matrix I to the matrix A.

Question 3: un stacking (12 points)

Complete the un stacking function, which takes one Matrix object as input and returns a new Matrix

object representing the matrix that was stacked in the augmented matrix. If M (M = [X|Y ]) is the

augmented matrix, the un stacking method must return a new Matrix object representing the matrix Y .

The following is a view of how the function looks in the Matrix.py file.

def un_stacking(self):

’’’Returns a new Matrix object that represent the matrix that was stacked in the

augmented matrix self.matrix.

pre-req: self.num_columns % 2 == 0

’’’

For this method you can safely assume that the number of columns in the augmented matrix is even

(i.e., self.num columns % 2 == 0 )

Question 4: gauss jordan (12 points)

The gauss jordan function, which takes one Matrix object (which represents an augmented matrix)

as input, compute the gauss jordan elimination method on that augmented matrix and returns a new

Matrix object with the result.

The following is a view of how the function looks in the Matrix.py file.

def gauss_jordan(self):

’’’Returns a new Matrix object that represent the resulted matrix of applying the

gauss_jordan elimination method on the augmented matrix self.matrix.

pre-req: self.num_columns % 2 == 0

’’’

a = [row[:] for row in self.matrix]

for i in range(self.num_rows):

if a[i][i] == 0.0:

sys.exit(’Divide by zero detected!’)

for j in range(self.num_rows):

if i != j:

ratio = a[j][i]/a[i][i]

for k in range(self.num_columns):

a[j][k] = a[j][k] - ratio * a[i][k]

#Start of ’I could not update this part, HELP!!!’

for i in range(n):

x[i] = a[i][n]/a[i][i]

#End of ’I could not update this part, HELP!!!’

return Matrix(a)

This method has been provided to you and it is a copy/paste version of the code mentioned in the

recorded video lecture. Please remember that in the slide 14 (of the recorded video lecture) we provided

a link with a sample program

http://www.codesansar.com/numerical-methods/gauss-jordan-method-python-program-output.

htm. We just copied that code and modify small details to accommodate it to our OOP model. However,

we run out of time in the preparation of this assignment and we were not able to modify all the code.

Particularly, the code that is inside the two comments “#Start of ’I could not update this part, HELP!!!”’

and “#End of ’I could not update this part, HELP!!!”’ was not fixed. Your job for this question is to

modify that part of the code to make it work on our augmented matrix. Please remember that the code

that you saw in the recorded video lecture works in an augmented matrix M = [A|b] where b is a vector

with one column. For this assignment, we are working with an augmented matrix M = [A|I], where I is

the identity matrix whose dimensions are the same than A. Please do not forget to comment the code.

Question 5: inverse (12 points)

Finally we have everything that is needed to compute the inverse of our matrix. Complete the inverse

function, which takes one Matrix object as input and returns a new Matrix object representing the

inverse of the input matrix. Please remember the protocol to find the inverse of a matrix.

1. Create an augmented matrix M = [A|I] by stacking the matrix I at the end of the matrix A. Please

Page 5

notice that we provided the function create identity and at this point you have already coded

the function stacking

2. Run the Gauss Jordan elimination method on the augmented matrix created in the previous step.

3. un stacking and return the result.

The following is a view of how the function looks in the Matrix.py file.

def inverse(self):

’’’Returns a Matrix object representing the inverse of self.matrix

’’’

Question 6: my test (0 points)

The function my test is there to give you a starting point to test your functions. Please note that this

function will not be graded, and it is there only to make sure that you understand what every function

is expected to do and to test your own code. Note: In order for you to test your functions one at a time,

comment out the portions of the my test() function that call functions you have not yet written.

What To Submit?

Attached to this assignment is a file called Matrix.py. PLEASE note that the code outside the body of the

function must not be modified. You have to submit only this Matrix.py file. Please DO NOT zip (or rar)

your files, and do not submit any other files.


關閉窗口
上一篇:程序設計代寫、java留學生編程代做、代寫program語言
下一篇:Python代寫Programming作業_Python作業代寫

相關閱讀

cs代寫_計算機作業代寫_靠譜代寫機構
cs代寫_計算機作業代寫_靠譜代寫機構

mingxinwrite 專業 代寫文章 的網站,提供優質的軟文代寫、論文潤色、論文翻譯、論文修改和 代寫作業 、代寫作文等服務. 您如果尋找靠譜的編程作業代寫,mingxinwrite代寫可以說,...

c/c++程序代寫、c++編程代寫,c++作業代寫
c/c++程序代寫、c++編程代寫,c++作業代寫

代做data留學生作業、代寫Python,Java編程設計作業、 代做c/c++語言作業 ,代寫data留學生作業、 代做c/c++ ,Java,Python程序語言作業、代寫program課程作業, UKXIE 擁有出身于世...

Python代寫Programming作業_Python作業代寫
Python代寫Programming作業_Python作業代寫

我們提供專屬的 CS程序代寫 服務,代寫各類程序語言: C語言代寫 , C++代寫, 算法作業代寫 , 數據結構代寫, AI代寫, python代寫 , java代寫, matlab代寫, 匯編代寫, scala代寫, GO代寫,Hask...

?
代寫
微信

微信客服

微信客服:2957088488

山東濟南市歷下區三慶財富中心

qq

QQ客服

QQ聯系:2957088488

代写大神| 美国代写| 留学生代写|