代写算法作业,选择时间序列算法解决给定的场景问题。
Background
The algorithm I choose was time series analysis, and below is my business
problem that I need to solve using time series analysis.
Releasing a new product is one of the most common business situation that a
company faces in the modern competitive world. In order to maintain
competitive advantage, a company needs to be both creative and innovative.
When introducing a new product, running a thorough analysis for market
response such as expected sales, marketing expenses, finance planning is
essential. If managers make the wrong decisions, under such circumstances a
company could suffer from loss in profit, or more severely, being driven out
of the market. Such analysis is what times series specialises in. Time series
analysis and forecasting It is a discrete-time data series with points indexed
in time order , it is also a sequence taken at successive equally spaced
points in time to analyse and extracts meaningful statistics in order to
predict future values and trends based on historical data. The four main
components demonstrated in times series are trend, cyclical fluctuation,
seasonality and residual effect.
The required word count for this assignment is 2000 words, excluding your
python code and your comments embedded in this code.
The purpose of this project is to assess:
- Your ability to understand, analyse and apply algorithms and code to a given problem.
- Your understanding of Computational Thinking concepts, especially in the context of good design. This will be demonstrated by your reflective analysis and description of these concepts in your report. It will also be demonstrated by the structure, understandability, simplicity and annotation of your code.
The requirements of this project are as follows:
Introduction
Consider a problem we have covered from this module or from any other module
(e.g. Data Analytics and MFoM) involving non-trivial algorithms. You are also
free to consider any other algorithmic topics we may not have covered e.g.
image-processing or gaming. The problem should relate to a management problem
or business-idea that requires the use of algorithms.
A non-trivial algorithm will be will involve loops and be of at least linear
complexity. The more complex your algorithm the more opportunity you will have
to demonstrate increased understanding and more sophisticated analysis,
providing enhanced potential of a good grade.
You may wish to continue with the same algorithm/problem you presented in your
Assignment 2 essay or choose a different algorithm or problem.
Example algorithms
Here are some examples of non-trivial algorithms you could consider:
- Data Analytical Classification algorithms including Decision Tree Induction and Nearest Neighbour
- Data Analytical Clustering algorithms including Hierarchical Clustering and K-Means Clustering
- Matrix Row Reduction algorithm to solve systems of simultaneous equations or to find inverse matrices
- Simplex Linear Programming algorithm
- Graph analysis algorithms, including shortest-path algorithms eg Dijkstra’s algorithm
- Search algorithms, including Dijkstra’s algorithm, A* search
- Exhaustive Enumeration and Greedy/Heuristic Algorithms for any NP-Complete problem (eg travelling salesman, knapsack packing problem, wedding banquet seating )
Report Format and Structure
The main body of your report has a word count limit of 2000 words, consisting
of a number of sections, as detailed below. In addition, you should include as
appendices: all your code appropriately commented; your test run outputs; and
extracts from your test data. There is no word limit on the appendices, which
will be assessed alongside the main body of your report.
You are required to submit two files, with a third optional data file:
- A single PDF document containing your full report, including all the appendices.
- A single supplemental code file, which can either be in the form of a standard python code file (.py) or a Jupyter notebook file (.ipynb). This code will not be marked, but may be required to validate that the code you have provided as an appendix can be executed, as claimed.
- An optional data file (.csv), if this is required to run your supplemental code file.
You are recommended to write your all the sections and appendices of your full
report in a single Jupyter notebook file, which can be saved as a PDF
document. Your supplemental code file will then just be the same notebook,
simply submitted in its standard executable format (.ipynb). A Jupyter
notebook template will be provided for this purpose.
The requirements of the code and code appendix are provided first in these
instructions as this forms the primary focus of this assignment. This is
followed by instructions for each of the sections of main body of the report.
CODE APPENDIX: Provide working python code that solves your problem (30%)
Provide, as an appendix to your report, your completed coded.
Embed in your code comments that describe each function in terms of its
purpose, inputs and outputs. Additional comments should also be included to
help explain key steps in your algorithms, and examples of particular
techniques you have used.
You are not required to have written all the code yourself.
There are plenty of examples of python code on the Internet that provide
solutions to any problem you are likely to consider. Please feel free to use
such code, providing suitable references to these sources. Any code you do re-
use should fully implement your chosen algorithms, so that you can identify
and comment on how the code implements these algorithms.
You are not allowed to use python modules that directly implement your key
algorithms in such a way that you cannot see exactly how the code implements
the algorithm.
You can though use standard python modules to provide appropriate data
representations for your algorithm (eg numpy for matrix data or networkx for
graph data) or provide other functions that do not form part of the core
implementation of your focus algorithm (eg math, statistics, csv, random
modules).
You are required to demonstrate you have fully understood the code and have
been able to apply it to your particular problem, using suitable test data.
This is likely to require, at a minimum, that you write some additional code
to run and test your algorithm code on your particular problem; maybe to load
data from a csv file, enter some initial input values, and to print or plot
outputs.
You should add additional print statements within your code to illustrate key
aspects of how the algorithm works.
You should also add appropriate additional code (such as loop counters) and
print statements within your code to help quantify the complexity your
algorithm.
You are required to provide code that it understandable and well designed.
Code copied from the Internet is often not well designed! Don’t necessarily
use the first version you find. You are likely to need to edit and potentially
change any code you re-use from the Internet so that it uses clear and
consistent names.
You will need to demonstrate decomposition in your code (ie it should contain
multiple functions, rather than one large single function). You may therefore
need to decompose a large unstructured program from the Internet into smaller
functions that are easier to understand.
Main Report Sections: - System Requirements and Your Algorithm (10%)
Describe your management problem or business-idea and outline the purpose of
the software system/application that addresses this problem/idea in the form
of a brief set of system requirements, listing:
* the functional requirements, identifying the key functions with their data inputs and outputs
* any non-functional requirements you believe may be important for this problem
Describe your algorithm, identifying:
* how your algorithm works
* how your algorithm helps solve your problem
* which functional requirements are associated with your algorithm
* any possible benefits or challenges your algorithm may have in respect of the non-functional requirements - Explain how the code works (30%)
Explain the design of your code.
Particularly comment on:
* The overall structure of the code in terms of the key functions it contains and how the code decomposes into a hierarchy of functions
* The flow of the overall code as it progresses from loading/inputting/generating some input data to providing the final solution to your problem
* In what ways the code is generalised
* How data is represented in your code and why it is represented in this way
* The use of any particularly noteworthy or advanced coding features such as: recursive functions, use of list comprehensions, passing functions as input parameters
* Use of error management code technique such as exception handling and assert statements
You must also identify and comment on which parts of the code are re-used (you
must reference the source of all re-used code), any re-used code you have
improved or changed (how and why), and which parts you have coded fully
yourself. - Analyse the complexity of your code (10%)
Explain how the key inputs to your problem can vary in size and nature. Assess
the expected running time complexity of your code in terms of an order of
magnitude of the size of your input value(s). Justify your results.
Test the actual run time performance of your code using a range of different
input size values.
Provide appropriate timing, loop-counter-based and/or theoretical Big(O) plots
to support your findings.
Explain you results and compare any theoretical or loop-counter-based analysis
with your experimental timing results.
Explain any realistic limits of your code, in regard to runtime performance. - Describe the data used to test your code (10%)
Describe the data you used to illustrate how your algorithm could solve your
particular management problem or business-idea software. Did you use an open
data source for this or did you create/generate the data yourself? Explain the
choices you made in this regard.
Explain how you tested your code using this test data.
Explain how you selected or generated different ‘sizes’ of data to analyse the
running time complexity of your code. - Conclusions (10%)
Briefly conclude by discussing the benefits and limitations of your code.
Things you may like to consider are:
* Explain in what ways you believe your code follows good design principles.
* Discuss any alternative approaches to solving this problem.
* Suggest how your code could be improved.
* Discuss whether and how you think this code can be generalised for use on different problems.
* Discuss any limitations in your test data and the implications for your findings
Assessment Criteria
In general, if you have fully addressed all the requirements in the above
statement for this assignment this should be indicative of a “very good”
grading.
Variations, by exception, from this standard are provided in the criteria grid
below:
Available Marks | Section | Excellent | Very Good | Good |
Satisfactory | Poor
—|—|—|—|—|—|—
30% | APPENDIX: Provide working python code that solves your problem |
Evidence of significant, complex, well-designed, and effective working code
written by the student. | Addresses all points required of this section. |
Evidence of student coding, including improves to the original code. Clear
code annotation. | Code works but there is limited evidence of additional
code development by the student and/or the code is inadequately annotated. |
eg Code is for a trivial algorithm, or Code does not work, or is not
annotated, or does not relate to the problem.
10% | 1. System Requirements and Your Algorithm | Algorithm is both
complex, explained well and relevant to stated problem. Both functional and
non-function requirements are appropriately identified and discussed in terms
of the problem and algorithm. | Addresses all points required of this
section. | Problem shows a moderate level of complexity and clear
explanation. | Problem chosen is adequate but simplistic with limited
opportunities to demonstrate a range of techniques and depth of understanding.
| eg A trivial algorithm is used, or the algorithm does not solve the
problem, or appropriate functional requirements are not provided
30% | 2. Explain how the code works | Explanation provides a clear and
correct identification of a wide range of CT concepts and good design
principles. | Addresses all points required of this section. |
Explanations are correct but the ideal range and depth of explanations has not
been provided. | Explanation is reasonably correct but the problem/code is
too simplistic to exhibit all the range and depth of explanations asked for.
| eg Explanation is incorrect
10% | 3. Analyse the complexity of your code | Provide a clear and
correct analysis of the complexity of non-trivial algorithmic code.
Demonstrates a range of complexity analysis techniques. Compares the
complexity and runtime performance of different algorithms or consider other
aspects of the data to determine best/average/worse case findings. |
Addresses all points required of this section. | Complexity analysis is
mostly correct and effective runtime timing analysis has been performed. |
Complexity analysis is mostly correct but the problem/code is too simplistic
to make this sufficiently challenging. | eg Complexity analysis is incorrect
10% | 4. Describe the data used to test your code | Large datasets have
been found and used to support appropriate testing, including over different
volumes of data. | Addresses all points required of this section. | Test
datasets have been used that align to the key functional requirements. | A
number of test cases have been used that align to most of the key functional
requirements. | eg. Datasets are very small or do not relate to the problem
10% | 5. Conclusions | Provides a well-argued case for the limitations
and potential of the code that demonstrates clear understanding. | Addresses
all points required of this section. | Concluding statements demonstrate
evidence of overall understanding. | Some concluding statements demonstrate
evidence of overall understanding. | eg. Conclusions do not adequately
consider any the points suggested
Word Count Policy
- The word count will include tables, diagrams and illustrations (and their captions) and footnotes but NOT the code appendix.
- The required content of the code appendix is detailed above and will be considered within the mark scheme as noted above.
- Students must state the word count on their cover sheet.
- Exceeding the word count will result in the deduction of 10 percentage points - that is 10 marks, thus a score of 65 would be reduced to 55.