logo

Algorithm Design with Loss Function

   

Added on  2020-05-28

6 Pages1366 Words64 Views
Running head: ALGORITHM DESIGN WITH LOSS FUNCTIONS1Student Name Institutional Affiliations Course Date
Algorithm Design with Loss Function_1
ALGORITHM DESIGN WITH LOSS FUNCTIONS2Problem 1: Multivariate Adaptive Regression Splines (MARS)a). MARS can only be changed by employing of various binary search algorithm that maintains the order of divide and conquer technique. One needs not settle on one method but keeps giving it a try for a number of them as shown. Important is that the change of procedure for MARS into a decision tree employees use of algorithmic design chosen at random and only selection of method either through carrying recursion or iteration ( Becker, 2017). One of advantage of decision tree against MARS is that it allows one to use data in its normal state. The decision tree are also not complicate like MARS and therefore they are easily understood. In the interaction in decision tree it is easy to add odd variables unlike in Mars. You also deal with minimal assumptions in decision tree.It should also be noted that there are disadvantages of decision tree which arise due to its inability to perform well. Trees are not perfect like Mars which is a disadvantage that puts MARS ahead of trees. Trees require relatively large sample which can result to higher errorLet the x→ the house for such Search(C, x, y) first ← C[i] middle ← C[(x + y)/2] last ← C[y] if x {last,middle, first, }: thenreturn loop for indexelse :if (x < last and x > first ) or (x > last and x > middle): [x for x > last ] thenreturn SEARCH(C,(i + j)/2, x, y) else : return SEARCH(C, i,(x + y)/2, x)The binary search tree for (C, i, j, x) employs recursion in the process for search. Failure to search for the item, leads to debugging. We first let k ≥ 0 for the number of points through which A was taken through. The proofthen is found when we try to trace k. It is achieved via binary search C[1 . . . z] and the “left side” C[j + 1 . . . z].It is determined from the search that elements on the right are less than those on the left C[1] for j > 1 such that C[j] is larger than C[1]. It is thus in that k = j − 1The upper bound for the search algorithm is chosen universally. It is because we can sort the sequence in the form Log (N) for N unless it is the worst case scenario. It will thus need us to gather permutation in the running time O log (N) Begin by numbering the houses, say Sn=1 for bottom up to Sn= N for the upper intersectionsubject to We then settn(sn) is the time for delay forthe intersection atSnfor stage n(MARS)
Algorithm Design with Loss Function_2
ALGORITHM DESIGN WITH LOSS FUNCTIONS3We can as well employ use of a spanning tree as follows for correction of algorithms used in thechange of procedure.We use the spanning tree for Kruskal’s algorithm to proof the correctness of the above algorithm.Let T = (V, F) (minimum spanning tree) in case it is not optimal , then F 6= F, such that an edge e F such that e 6 F. e would create a cycle C for the graph G +e. Addition of the edges from the graph G by speculation would reconnect the graph G+e for the spanning tree.The upper bound for the search algorithm is chosen based on the running time for the worst case. It is because we can sort the sequence in the formO(E log E) for N unless it is the worst case scenario. It will thus need us to gather permutation in the running time O (E log E )) The execution of the algorithm takes different forms but for our case we would prefer use of Java script. The algorithm coding takes the form shown below. b) Advantage of MARS over decision treesThe method would apply recursion with divide and conquer methodology /** Return the sum of the values in a binary tree with root wn */ public intsum(BTNodewn) {if (n== null) { return 0; }else { return w0.value + sum(w1.left) + sum(Wn.right); } }
Algorithm Design with Loss Function_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
AVL Tree, Set Intersection Algorithms, Sloppy Inc. Communication, Array Search
|9
|2413
|78

Desklib SEO Suggestions
|9
|2414
|194

Algorithm Analysis and Examples
|15
|1404
|218

Data Structure and Algorithms - Desklib Online Library
|16
|1240
|91

Algorithms for Searching, Sorting, and Matrix Operations
|8
|1756
|131

COMP3821 Extended Algorithms and Programming Techniques
|5
|2703
|54