Coursework 1: Student examples
The following examples are extracts from previous students' coursework to provide a guidance as to the standards expected. Full coursework
examples are not provided to avoid potential issues with copying (plagiarism); and also as the coursework changes each year so there is no
single coursework that matches the current.
These are examples of actual student work and not 'templates' to copy.
The coursework specifications vary each year, do not assume that the examples comply with the guidance in this year's specification.
Always refer to the current specification.
Start work early on your coursework and use the tutorials to gain formative feedback.
The 'good' examples are drawn from 2:1 or distinction responses, but marks are not provided.
The examples are accompanied by a brief comment to explain what was considered either "good" or "could be improved" about the given
example.
Past students have published their code with 'public' visibility on GitHub; you must not copy their code. Copying from other students, past or
present, is not appropriate even when correctly cited.
Section 1: Data exploration and preparation
Please note that last year this section was not separated into understanding and preparation in the same way as it is this year. The following
examples will give you an understanding of standard, but do not exactly match what you are asked to do this year.
General guidance
Describe and explain the steps you took, your findings, and any decisions you made.
For example, if you identify code quality issues then explain how you addressed these; or if you chose not to address them, then explain the
reason for not addressing them.
Do not focus on interpreting the data as if for a particular audience. For example, comments such as "I created _X_ chart to explore the range of
values of _Y_ variable and found that there were _Z_ outliers" are relevant in the context of this coursework; comments such as "The data shows
that more people migrated from in London in 2023 than in 2022." is not relevant in the context of this coursework.
Example 1: Boundary between High pass/Merit
Feedback: "The code shows some understanding of the use of pandas, though you could have done more to describe the data using the pandas
functions to show size, data types, ranges of values, etc. There is some attempt at adding structure in functions though it's a little jumbled. Try
and separate out the functions from the 'main' where you then call the functions."
It wasn't clear why the student commented out the code to create the charts.
The text supported the written code and evidenced that the student has gained a good understanding through applying the code, however the
code and explanation combined was not sufficient to attain a higher mark.
Student's code (parts removed to reduce the length of this page)
import pandas as pd
import matplotlib.pyplot as plt
if __name__ == '__main__':
df = pd.read_csv('dataset.csv')
# first, lets translate all the data from german to english
def ger_to_eng(dataframe):
column_rename_map = {
"StichtagDatJahr": "ReferenceYear",
"DatenstandCd": "Status",
...removed...
1/11
}
dataframe.rename(columns = column_rename_map, inplace = True)
word_mapping = {
'm?nnlich': 'male',
'weiblich': 'female',
'10- bis 19-J?hrige': '10-19 years old',
...removed...
# add more translations as needed
}
dataframe.replace(word_mapping, inplace=True)
# second, cleaning up the data
def del_redundant_cols(dataframe):
# i'll be removing columns which i deem redundant
del_columns = ['AgeGroupCode', 'DogAgeGroupLong', #'DogAgeGroupSort',
'GenderCode', 'DogGenderCode', 'BreedCode']
# delete specified columns
for col in del_columns:
del dataframe[col]
# next let's examine the data a bit
def dog_age_check(dataframe):
age_tally = dataframe['DogAgeGroupCode'].value_counts().sort_index()
age_tally = age_tally.drop(999, errors='ignore') # accounts for the unknown entries, which default to 999, removing them
# plotting a bar chart
plt.bar(age_tally.index, age_tally.values, color='skyblue')
plt.xlabel('Age')
2/11
plt.ylabel('Amount of Dogs')
plt.title('Age of Dogs Tabulated')
plt.show()
'''def owned_dog_count(dataframe):
# groupby OwnerID and sum up every number of dogs tied to that owner
dogs_per_person = dataframe.groupby('OwnerID')['NumberOfDogs'].sum().reset_index()
# Display the result
plt.figure(figsize=(10, 6))
dogs_per_person.plot(kind='bar', color='skyblue')
plt.title(f'')
plt.xlabel('Number of owned dogs')
plt.ylabel('Frequency')
plt.show()
plt.bar(dogs_per_person.index, dogs_per_person.values, color='skyblue')
plt.xlabel('Number of owned dogs')
plt.ylabel('Frequency')
plt.title('Number of dogs owned by a single person')
plt.show()
plt.figure(figsize=(10, 6))
plt.bar(dogs_per_person.index, dogs_per_person, color='skyblue')
plt.yscale('log') # Set y-axis to logarithmic scale
plt.title(f'Frequency Bar Graph for num_dog')
plt.xlabel("num of dogs")
plt.ylabel('Logarithmic Frequency')
plt.show()
def create_dog_bar_chart(dataframe):
owner_counts = dataframe.groupby('OwnerID')['NumberOfDogs'].nunique().reset_index()
# Plotting the bar chart
3/11
plt.bar(owner_counts['NumberOfDogs'], owner_counts['OwnerID'])
plt.xlabel('Number of Dogs Owned')
plt.ylabel('Number of Owners')
plt.title('Number of Owners for Each Number of Dogs Owned')
plt.show()'''
ger_to_eng(df)
del_redundant_cols(df)
dog_age_check(df)
df.to_csv('dataset_prepared.csv')
4/11
Example 2: Distinction
5/11
Feedback: "Great use of functions, comments and docstrings. Some great work on cleaning the data, especially considering how you would
detect outliers. Great visualisation of the data, what does this mean for your product??"
The code from the functions below has been removed, however the student went beyond what was taught in the course.
Code:
import math
import matplotlib.pyplot as plt
import pandas as pd
import warnings
from datetime import timedelta
warnings.simplefilter(action="ignore", category=FutureWarning)
# ignore the waring from df.approve
def print_general_statistics(df):
"""
print the general information about the dataframe;
print first 5 rows and all the columns of the data frame;
demonstrate number of row and column of the data frame;
print the data types; general statics information of the data frame
Args:
df: The data frame imported.
"""
pd.set_option(
"display.max_columns", None
) # set all the columns visible in the terminal printing
pd.set_option("display.width", None)
print("\nthe first 5 rows of dataframe :\n")
print(df.head(12))
print("\nThe Rows and Columns number:\n")
print("\nRow Number :" + str(df.shape[0]))
print("\nColumn Number :" + str(df.shape[1]))
print("\nColumn data types:\n")
print(df.dtypes)
print("\nStatistics:\n")
print(df.describe()) # Add your code inside the brackets
def null_data_detection(df):
def time_stamp_format_convert(df):
def breaking_point_detection(df):
def interpolation(df):
def timestamp_delete(df):
def outlier_detection(df, window_size=5, threshold=3):
def different_activity_frame_division(df):
def statics_histogram(df, name):
def statistics_boxplot(df, name):
def smoothing(df):
def smoothing_all(df):
if __name__ == '__main__':
# read dataframe from csv
df_raw = pd.read_csv("dataset.csv")
# detect whether there is null data from the dataframe
# print the general statistics
print_general_statistics(df_raw)
# detect null values
df_after_null_preprocess = null_data_detection(df_raw)
6/11
# convert timestamp to datetype and allow the after calculation
df_after_time_stamp_convert = time_stamp_format_convert(df_after_null_preprocess)
print_general_statistics(df_after_time_stamp_convert)
# detect whether index =20928 has varied or not
print(df_after_time_stamp_convert.loc[20928, "timestamp"])
# delete same timestamp in the dataframe
df_after_delete = timestamp_delete(df_after_time_stamp_convert)
# interpolate lost data between the datapoints
df_interpolation = interpolation(df_after_delete)
# divide dataframe according to Activity
df_activity_0, df_activity_1 = different_activity_frame_division(df_interpolation)
# detect the outliers
outlier_detection(df_activity_0)
outlier_detection(df_activity_1)
# draw the figures
statics_histogram(df_activity_0, "Activity = 0")
statics_histogram(df_activity_1, "Activity = 1")
statistics_boxplot(df_activity_0, "Activity = 0")
statistics_boxplot(df_activity_1, "Activity = 1")
# smoothing the data frame
df_final = smoothing_all(df_interpolation)
df_final = df_final.drop(columns="timestamp_datetype")
df_final.to_csv("output_file.csv", index=True)
Extract from the report:
This is just the first part so you can see the difference in the quality of the explanations. The student went on to explain the actions taken in each
of their functions, though some of the text was unnecessary as it also described the code which wasn't necessary.
7/11
Section 2: Database design and preparation
Please note that this section is substantially different in 2024.
Database design was included as part of the application design in coursework 2, and not coursework 1. The design of the database covered
requirements for their app, and not the data set so is different to what you are asked to do.
Students were not taught the first, second and third normal forms and so the expectations of their coursework was lower and therefore the
grades awarded higher than would be given for the same this year. I have tried to comment on the implications.
Preparation of the database is new to the coursework this year so there are no student examples from COMP0035. Students created the
database in COMP0034 and used different libraries. The students who achieved a higher grade showed originality in their code, tackled
databases with multiple tables, and provided well structured and documented code; those who achieved a high pass tended to just copy the
tutor's example code from the tutorial's and make minor changes to adapt it to their data.
Example 1: High pass
Feedback: "The ERD is a little confusing, why are you storing the account data in two places? The account data is enough. If you plan to create
the activity chart then you probably need a new table with attributes such as user_id, date/time, route they accessed. I assume the Visualisation
Chart is really the demograophic data so the table probably just needs a more meaningful name. A good attempt at each aspect of the design
with a few areas that could be improved."
Example 2: High Merit / Distinction boundary
Feedback given: "The ERD is well drawn and shows an understanding of normalisation. It is consistent with other aspects of the design."
Note that last year students were not taught 1NF, 2NF and 3NF, so this coursework evidenced that the student had carried out some
independent research to understand normalisation, though this is a copy and paste of the normalisation criteria rather than an explanation of
how these were applied in the context of this design.
Extract from student's PDF:
8/11
Example 3: Excellent (>70)
Feedback: "The development of the ERD similarly shows a clear grasp of the concepts of database design and normalisation and the resulting
design is well presented and approprate. This is an excellent coursework that not only evidences mastery of the techniques taught but also
clearly evidences an excellent grasp of the implications of the concepts and extensive additional reading."
This student provided a detailed explanation of the steps and decisions they made at each stage of normalisation, discussing the implications of
the choices they made. Their work evidenced that they understood and carefully applied the concepts. This far exceeded what was taught within
the course last year.
Student's ERD diagram only:
9/11
Section 3: Tools
Linting was not included in coursework 1 but was included in coursework 2. Source code control was assessed by looking at the commit history
and messages in their repository so cannot be included here. Including the environment files without seeing the students environment will not
give you a meaningful example. Since there is no meaningful way to provide student examples, the following is the feedback given to students
only.
Students achieving this highest marks in this section also provided evidence of the use of tools that went beyond the required tools. I will not list
these as this would then not be exceptional; this is an opportunity for students achieving the higher marks to research tools that support code
quality and development and apply something that is not covered in the course.
Source code control
High pass: "Some use of source code control over a period though you appear to mostly upload files rather than synchronise files between a
local and remote repository."
High merit: "Regular use of source code control with clear and meaningful commit messages."
Distinction: "Regular use of source code control with unique commit referencing. Evidence of effective use of branches and pull requests."
Linting
10/11
High pass: The code itself appeared free of issues that would typically be flagged by a linter so some assumption could be made as to effective
linting, but there was little or no evidence provided by the student to explain how they used linter tools to achieve this.
Merit: Provided evidence of using a linter, and the code appeared free of issues. Low merit: may have provided evidence of using the linter but
not then used this to improve the code.
Distinction: Provided evidence of using a linter at different stages; discussed actions taken and in cases where the issues could not be resolved,
gave an appropriate explanation for this. Some used more than one linter and compared the results.
Environment management
High pass: One or more of the required files was missing and/or in general the files were missing some details that prevented them from being
fully usable.
Merit: All files provided and were appropriate to allow the environment to be recreated and their code run. May have had minor issues e.g. a
package missing from requirements.txt, a detail within pyproject.toml missing or incorrect.
Distinction: Some students showed use of different techniques for creating and managing environments; and/or used the files with very specific
detail beyond the basics; and gave very clear guidance in the readme.md that led to the marker being able to successfully create an environment
and run the students code.
Last modified: Saturday, 28 September 2024, 6:36 PM
Previous activity
Data sets: ethics, data set size, collusion
Next activity ?
Examples of web apps from COMP0034
相关推荐
机器人视觉伺服控制入门:从IBVS到PBVS的实战指南(附Python代码示例)
本文深入解析机器人视觉伺服控制,对比了基于图像的视觉伺服和基于位置的视觉伺服两大核心方法。通过实战案例与Python代码示例,详细阐述了从误差计算、交互矩阵到速度控制的全流程,帮助读者掌握如何利用视觉反馈实现机器人的实时闭环控制,提升其在动态环境中的作业能力。
[已解决]运行大语言模型时,遇到的各种报错信息及解决方法
在进行部署ChatGLM大语言模型时遇到的报错信息
ch32v103xx 烧写
烧写方式 串口uart, usb,swd(wch link)但不建议按此使用,参官方说明。
已解决,部署GPTSoVITS报错‘AsyncRequest‘ object has no attribute ‘_json_response_data‘
部署GPTSoVITS过程中,开启一键三连进程发生,报错'AsyncRequest' object has no attribute '_json_response_data'报错的地方出现的py包为gradio,因此第一debug思路为换个gradio版本,优先考虑最新版本。重新运行webui.py在gradio页面中开启一键三连还是报错了。因此替换为3.xx.x最后一个版本——3.50.2。此时gradio中出现页面为一键三连进程结束。接下来就可以实现三连进程的正常运行了。
13-单片机模块化程序: 单片机AT指令配置模块程序模板(非阻塞版)
资料源码:https://gitee.com/yang456/OpenProgrammingModuleForMCU.git 点击加入群聊【单片机,物联网,上位机】: 说明1:知识从未如此性感。 烂程序员关心的是代码,好程序员关心的是数据结构和它们之间的关系! 说明2:学的是思想,而非程序!此代码思路适用于所有的单片机。 说明3:学会以后,下面的代码可能会跟你一辈子! 说明4:这一系列文章是为大幅度裁剪本人博客文章!使博客文章更有条理。便于推其它教程! 拷贝这两个文件到自己的工程 ..
Android P HAL层添加HIDL实例(详细实现步骤)
Android P HAL层添加HIDL实例 本文将介绍如何在P OS上添加HIDL实例,简单增加seLinux策略使得可以在system_service调用测试,并用模拟器emulator验证。 调用过程为 APP->TestManager->TestService->ITast.hal 文章目录Android P HAL层添加HIDL实例实现过程一 、hardware部分1...
【笔记】无需卸载!gradio 及其他包指定版本升级技巧
当遇到 gradio 版本升级提示时,pip install --upgrade gradio==目标版本号 是安全升级的有效方案。该方法既能将 gradio 更新至适配版本,又能最大限度保留项目原有依赖生态,避免因直接升级导致的兼容性问题。即便使用指定版本升级,仍可能触发与其他包、库的依赖冲突。因此,升级完成后必须全面测试项目核心功能,若出现异常,需通过pip check检查依赖版本,必要时调整其他包版本或修改代码,确保系统稳定运行。。
电磁兼容(EMC)整改案例(七):EFT测试失败都是IC悬空引脚惹的祸
无论任何时候,为了避免这些问题,通常建议对悬空的IO口进行适当的配置,比如设置为强推挽输出低电平、输入带上拉或下拉电阻等,以减少外部电路对IO管脚状态的影响,并提高系统的稳定性和可靠性.
【成功解决】You are using pip version 19.0.3, however version 20.0.2 is available
【成功解决】You are using pip version 19.0.3, however version 20.0.2 is available
基于NB-IoT的智慧路灯监控系统(NB-IoT专栏—实战篇1:项目简介)
基于NB-IoT技术的城市道路智慧路灯监控系统,在每个照明节点上安装一个集成了NB-IoT模组的单灯控制器,单灯控制器再经运营商的网络,与路灯控制平台实现双向通信,路灯控制平台直接对每个灯进行控制,包括开关灯控制、光照检测、自动调节明暗、电耗分析等操作。
【DRAM存储器六十八】DDR5介绍--DQS Interval Oscillator—动态时序校准利器
DDR5内存采用DQS间隔振荡器(DQSIntervalOscillator)技术应对高速数据传输中的时序漂移问题。该技术通过测量DQS信号在可编程时间窗口内的振荡次数(16位计数值),动态监测温度/电压变化导致的DQS-DQ延迟偏移。控制器通过MPC命令启停振荡器,读取MR46/MR47寄存器获取计数值,并与基准值对比来调整DQS相位,确保数据采样窗口始终处于最佳位置。该机制使DDR5在8400MT/s高速率下仍能保持数据可靠性,有效补偿±0.48tCK的时序偏移。
GPTSoVITS运行异常Could not create share link. Missing file: E:\..\gradio\frpc_windows_amd64_v0.2 Please
frpc_windows_amd64_v0.2 这个是没有后缀的。重启python webui.py。下载好该组件exe并重命名为。
《YOLOv8:从入门到实战》专栏介绍 & 专栏目录
本专栏涵盖了丰富的YOLOv8算法从入门到实战系列教程,专为学习YOLOv8的同学而设计,堪称全网最详细的教程!🌈🌈🌈
plugin since you are using Gradle version 4.6 or above
Android studio项目在新的开发环境下打开时报错如下 解决方法如下: 1、目录选到Android状态 2、进入gradle.properties文件。 3、org.gradle.configureondemand=false——————默认是true。改完false即可 ...
pscad IEEE标准系统搭建说明
pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。
贝叶斯统计 [韦来生编]
贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。 本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。 大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。 作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。 本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。
【都已解决】关于YOLOv10环境配置的一些问题
首先,下载yolov10文件后,里面会有一个requirement.txt文件,文件中包含以下内容,将torch和torchvision注释掉(按照文件中的安装后续会出现错误)按照正常流程创建虚拟环境和激活虚拟环境其次,安装cuda,我安装的是cuda11.8,安装教程可参考这篇,安装好cuda之后一定要记得根据requirement.txt中记载的torch和torchvision对应的版本安装,这点很重要:!!!一定记得cuda版本、torch版本、torchvision版本。
温度PID控制PLC程序
温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值
湖北师范大学-Python程序设计-6.3 分配学号(project)
例如:012171985170110 表示本科生、2017年入学、文法学院、 编辑出版专业、1701班、排名为10的同学。学号创建规则是:学生层次+入学年份后两位+学院代码+专业代码+班级号+班中排名;012142172140101 段宁 女 国际学院 金融 金融gj1401 2014。
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
WARNING: You are using pip version xxx; however xx is available
升级 pip
DragGAN,windows安装教程,附带问题解决
DragGAN,ai,图像操作,教程
pip install 时报错:WARNING: You are using pipversion 19.2.3 , however version 21.2.4 is available.
今天想用pip安装Django遇到报错,提示我pip版本过低,需要升级。 方法一:于是按照报错指示,输入:python -m pip install --upgrade pip后,依然报此错误(推测可能由于下载源的问题,请求国外服务器超时下载不到资源) 方法二:接着又试着执行命令:easy_install -U pip 依旧报错提示权限问题。 方法三:使用国内源下载更新,输入:python -m pip install --upgrade pip -i https://pypi.do.
书生浦语大模型实战营Linux+InternStudio 关卡
闯关任务:完成SSH端口映射。
安装numpy出现警告WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
Microsoft Windows [版本 10.0.19041.985] (c) Microsoft Corporation。保留所有权利。 C:\Users\Tommy>Python Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more infor.
pip升级更新到19.3.1后运行出错问题.You are using pip version x.x.x, however version 19.3.1 is available.
pip升级更新到19.3.1后运行出错问题.You are using pip version x.x.x, however version 19.3.1 is available. 用尽办法,甚至下载get-pip.py。运行都无济于事。 其实。。。这个问题很简单 看看是不是装了多个版本的python啊。比如你装了Visio Studio 20xx 。或你装了一个python3.6 一个pyth...
Gradio版本升级:迁移指南
还在为Gradio版本升级而犹豫不决?担心新版本会破坏现有代码?每次看到`pip install --upgrade gradio`都心惊胆战?本文为你提供最完整的Gradio版本迁移指南,一文解决所有升级顾虑! **读完本文你将获得:** - ✅ Gradio主要版本变更历史与关键特性 - ✅ 从旧版本迁移到新版本的具体步骤 - ✅ 常见兼容性问题的解决方案 - ✅ 自动化迁移工具和最佳实践 ...
【书生】Task1~4 入门(linux/python/git/huggingface)
前言:作业审判官可以直接点击目录查看作业更加方便哦~
解决You are using pip version 19.0.3, however version 20.0.2 is available.问题
在加载turtle库时,出现如下错误 这里提示我们需要升级pip,通过如下命令: python -m pip install -U pip 于是: 卒。 修改命令: python -m pip install --upgrade pip 又卒。 再次修改命令: pip install --upgrade pip --user 成功,但是这里出现了警告。为了防止之后调用pip时出现其他...
numpy报错
出现错误: ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in [‘E:\anacondaInstall\lib\site-packages\numpy’]. One method of fixing this is...
266



被折叠的 条评论
为什么被折叠?



