关于后端:ELEC362线性分析

8次阅读

共计 7869 个字符,预计需要花费 20 分钟才能阅读完成。

Page 1 of 5
Department of Electrical Engineering and Electronics
ELEC362
Project
Linear regression application
Module ELEC362
Coursework name Project
Component weight 50%
Semester 1
HE Level 5
Lab location personal computers/laptops, university remote computer
Work Individual
*Estimated time to finish 40 hours (coding and testing)
Assessment method Individually
Submission format Online via VITAL
Submission deadline 11.59 pm on the 17th January, 2021
Late submission Standard university penalty applies
Resit opportunity None except for extenuating circumstance
Marking policy Marked and moderated independently
Anonymous marking No (the marker needs to link the code to the report)
Feedback via VITAL GradeMark® / Turnitin Feedback Studio
Expected release of marks date 15 business days from the deadline
Learning outcomes LO2: Using C++ to implement GUI-based software.
LO3: Using online documentation for self-learning.
*Note: This estimate may vary based on the need to debug your application. Make sure
you start working on the project as soon as possible.
Page 2 of 5
The project
Task 1: Design and implement a Qt-based GUI linear regression application. The application reads a
file of data points, given by two columns one for x coordinates and one for y coordinates, then
calculates the best linear fit of the form:
𝑦 = 𝑎𝑥 + 𝑏
Where“a”and“b”are parameters to be determined by the application. You are requested to work
on the GUI only. The regression part of the application will be done by GSL library. Binaries for linking
Qt to the library will be provided for both Windows and Mac OS on VITAL. The documentation of the
linear regression part of the library can be found in this link. You are not asked to study the theory
behind linear regression. All what you are expected to do is to know how to implement the function
from the library into your application, and how to display its return or output to the user.
The application will be used to do linear regression for one file at a time.
In addition to the core functionality mentioned above, the application:

  • Should plot the data and the fitted curve on a single graph in the application.
  • Should allow the user to choose the thickness and the colour of the plotted curve using 3
    different means.
  • Should give the user the option to do the fitting with and without a constant term.
  • Should be validated, in the report, by using a test dataset as an input to the application
    obtaining the fitted line, then comparing the fit to a linear fit by another programme such as
    MATLAB or MS EXCEL (No linking to EXCEL or MATLAB is required in the application).
  • Should be able to deal with potential run-time errors, which the developers should identify.
    Task 2: Modify the application to have a bilinear fit mode, where the fit of the dataset should be
    done using a piecewise function of the form:
    𝑦 = {
    𝑎1𝑥 + 𝑏1 𝑥 < 𝑥0
    𝑎2𝑥 + 𝑏2 𝑥 > 𝑥0
    The application should calculate (a1,b1,a2,b2) in additional to automatically identify the point x0
    which gives the best possible fit. This part if meant to be as a challenge and as a result no hints will
    be given on how to do this part. An example of a bilinear fit is shown in figure 1.
    It is an expectation from everyone to consult Qt documentation to find any functions or classes that
    might be useful for the implementation of this project. Finally, you should make the programme as
    professional as possible. Imagine this project as a real-life project given to you.
    Approach to be followed
    The following steps will help you to have a good design and implementation of the application:
    – Start by conducting a background overview of the available programs that for linear
    regression and how they are used. This will give you a feeling of what a professional design is
    Page 3 of 5
    and a better understanding of the core functionality. Make sure the practical notes given in
    the lectures ae taken into consideration in your design and implementation.
    – Follow the incremental model by breaking the implementation of the application into smaller
    parts, where every part is designed, implemented and tested before other parts are
    implemented.
    – Make sure your application is working perfectly before moving to task 2.
    Note for Mac OS users: You can develop the application and write the report based on Mac version
    of the app. The application will be tested and marked on a Windows machine. You are strongly
    recommended to verify that your app works as it should on a windows machine before submission,
    to avoid any potential cross-platform issue, if you have any problems, please let me know.
    Figure 1: Example of a bilinear fit for data.
    The deliverables
    Every submission should consist of the project’s files + brief report (Do NOT submit GSL library’s files
    as I will compile your project with local GSL files on my machine). The report must have the student’s
    name and ID number. The report does not need an introduction or a conclusion, it must have a cover
    page, and includes the following sections:
    • How the programme works (explain the idea of the algorithm, include a block diagram).
    • User instructions (how should the user use it)
    • Testing and verification attempts.
    • Overall notes (optional): in this section you can highlight any special features in your design
    or implementation of the application. Or you can mention any major issue you faced how
    you overcome it. If you left this section empty you will not lose any marks.
    • Appendix: headers+ source files (must be in machine readable format).
    X0
    a2 , b2
    here
    a1 , b1
    here
    Page 4 of 5
    Industrial Relevance
    Designing a GUI for a C++ library is a routine task for software developers at MATLAB (where some
    linear algebra packages are embedded), National Instruments (MultiSim where libraries for solving
    ordinary differential equations are embedded), ANSYS (where all their products such as Fluent and
    CFX include libraries related to meshing and nonlinear solvers), CST studio suite, and the list goes on..
    Many software development projects are entirely based on building GUI to famous libraries,
    examples include Elmer FEM software, Gmsh, and ParaView.
    Mapping the project to modules’material:
    Aspect Where it is covered
    Creating child windows or child dialogs. Lecture 16, Lecture 18
    Linking external library in Qt Lecture 13, instruction videos, the
    tutorial
    Saving object in vectors in Qt Week 8 lab, the tutorial
    Loading and saving files Lecture 18, week 9 lab
    Error handling week 9 lab, the tutorial
    Implementing mouse functionality Lecture 16, the tutorial
    Handling drawings Lecture 17, the tutorial
    Implementing a functionality using different methods Lecture 16, week 8 lab
    Controlling the style, layout and GUI design Lecture 15, the tutorial
    Implementing buttons and other input widgets functionality Lectures 14-15, week 7 lab
    Online documentation https://doc.qt.io
    Page 5 of 5
    *Marking Criteria
    Criteria
    (weight %) What does it mean?
    Indicative characteristics
    Adequate / pass
    (40%)
    Very good / Excellent
    Algorithm and
    design of the
    programme
    (task 1) (20%)
    Does the application
    do what it is designed
    to do? Does the
    application handle
    memory efficiently?
    • The programme does
    what it designed to do
    with clear
    shortcoming.
    • The use of memory is
    completely inefficient
    but is working.
    • The programme does what it
    designed to do without any
    flaws an in an efficient way
    • The memory management is
    very efficient.
    Code and GUI
    implementation
    (task 1) (20%)
    Is the code well
    organised? Are the
    variables named
    properly? Is the code
    well commented?
    Does it use the most
    suitable datatypes for
    the variables? Is the
    GUI user friendly?
    • The code shows the
    steps but is difficult to
    understand what it
    does.
    • Poorly commented
    code.
    • The naming of the
    variables is arbitrary
    and does not give any
    idea on what the
    variables are used for.
    • The GUI is difficult to
    handle and is
    unorganised.
    • Layout of the GUI is
    not set.
    • The code is written in very
    organised way that is easy to
    follow.
    • The code is very well
    documented.
    • The variable naming is
    appropriate and follows
    professional naming rules.
    • The GUI is very easy to work
    with.
    • The data structure used are
    the most appropriate for the
    purpose they are used for.
    Verification and
    Error-Handling
    (task 1) (20%)
    Has the application
    been validated and
    verified? What does
    the programme do if
    there is a run-time
    error?
    • The application was
    tested for one case
    only.
    • The application
    contains minimal
    error handling.
    • The application has been
    thoroughly tested.
    • Error handling has been done
    professionally for a number
    of potential run-time errors
    and user input errors as well.
    Task 2 (15%) Does the application
    provide bilinear fitting
    mode? Does it
    determine X0
    automatically?
    • The bilinear mode
    works with many
    shortcomings.
    • The bilinear mode works
    automatically in a fully
    functional manner without
    any flaws.
    Report
    (25%)
    Is the report clear and
    descriptive? Does it
    have all sections? Are
    the user instructions
    given clear?
    • The report is
    understandable but
    contains many errors.
    • The length of some
    sections is
    inappropriate – either
    too short or too long.
    • The source codes are
    given in the appendix
    but they are not
    machine readable.
    • The report is well written,
    and all the relevant
    information it should contain
    are clearly stated.
    • The report is concise.
    *If you have a feedback query after the marks are released make sure you contact me
    within 2 weeks, after that the marks are finalised and sent to the SSO.
正文完
 0