COMP5328 - Advanced Machine Learning
Assignment 1
Due: 19/09/2024, 11:59PM
This assignment is to be completed in groups of 3 to 4 students. It is worth 25%
of your total mark.
1 Objective
The objective of this assignment is to implement Non-negative Matrix Factorization
(NMF) algorithms and analyze the robustness of NMF algorithms when the
dataset is contaminated by large magnitude noise or corruption. More speciffcally,
you should implement at least two NMF algorithms and compare their robustness.
2 Instructions
2.1 Dataset description
In this assignment, you need to apply NMF algorithms on two real-world face
image datasets: (1) ORL dataset
1
; (2) Extended YaleB dataset
2
.
• ORL dataset: it contains 400 images of 40 distinct subjects (i.e., 10 images
per subject). For some subjects, the images were taken at different times,
varying the lighting, facial expressions and facial details (glasses / no glasses).
All the images were taken against a dark homogeneous background with the
subjects in an upright, frontal position. All images are cropped and resized
to 92×112 pixels.
• Extended YaleB dataset: it contains 2414 images of 38 subjects under
9 poses and 64 illumination conditions. All images are manually aligned,
cropped, and then resized to 168×192 pixels.
1https://cam-orl.co.uk/facedatabase.html
2http://vision.ucsd.edu/ leekc/ExtYaleDatabase/ExtYaleB.html
1Figure 1: An example face image and its occluded versions by b × b-blocks with
b = 10, 12, and 14 pixels.
Note: we provide a tutorial for this assignment, which contains example code for
loading a dataset to numpy array. Please ffnd more details in assignment1.ipynb.
2.2 Assignment tasks
1. You need to implement at least two Non-negative Matrix Factorization (NMF)
algorithms:
• You should implement at least two NMF algorithms with at least one
not taught in this course (e.g., L1-Norm Based NMF, Hypersurface Cost
Based NMF, L1-Norm Regularized Robust NMF, and L2,1-Norm Based
NMF).
• For each algorithm, you need to describe the deffnition of the objective
function as well as the optimization methods used in your implementation.
2.
You need to analyze the robustness of each algorithm on two datasets:
• You are allowed to design your own data preprocessing method (if necessary).
•
You need to use a block-occlusion noise similar to those shown in Figure
1. The noise is generated by setting the pixel values to be 255 in the
block. You can design your own value for b (not neccessary to be 10, 12
or 14). You are also encouraged to design your own noise other than
the block-occlusion noise.
2• You need to demonstrate each type of noise used in your experiment
(show the original image as well as the image contaminated by noise).
• You should carefully choose the NMF algorithms and design experiment
settings to clearly show the different robustness of the algorithms you
have implemented.
3. You are only allowed to use the python standard library, numpy and
scipy (if necessary) to implement NMF algorithms.
2.3 Programming and External Libraries
This assignment is required to be ffnished by Python3. When you implement
NMF algorithms, you are not allowed to use external libraries which contains
NMF implementations, such as scikit-learn, and Nimfa (i.e., you have to implement
the NMF algorithms by yourself). You are allowed to use scikit-learn
for evaluation only (please ffnd more details in assignment1.ipynb). If you have
any ambiguity whether you can use a particular library or a function, please post
on canvas under the ”Assignment 1” thread.
2.4 Evaluate metrics
To compare the performance and robustness of different NMF algorithms, we provide
three evaluation metrics: (1) Relative Reconstruction Errors; (2) Average
Accuracy (optional); (3) Normalized Mutual Information (optional). For all
experiments, you need to use at least one metric, i.e., Relative Reconstruction
Errors. You are encouraged to use the other two metrics, i.e., Average
Accuracy and Normalized Mutual Information.
• Relative Reconstruction Errors (RRE): let V denote the contaminated
dataset (by adding noise), and Vˆ denote the clean dataset. Let W and H
denote the factorization results on V , the relative reconstruction errors
then can be deffned as follows:
RRE =
∥Vˆ − WH∥F
∥Vˆ ∥F
. (1)
• Average Accuracy: Let W and H denote the factorization results on
V , you need to perform some clustering algorithms (i.e., K-means) with
num clusters equal to num classes. Each example is assigned with the
cluster label (please ffnd more details in assignment1.ipynb). Lastly, you
3can evaluate the accuracy of predictions Ypred as follows:
Acc(Y, Ypred) =
1
n
Xn
i=1
1{Ypred(i) == Y (i)}.
• Normalized Mutual Information (NMI):
NMI(Y, Ypred) =
2I(Y, Ypred)
H(Y ) + H(Ypred)
,
where I(·, ·) is mutual information and H(·) is entropy.
Note: we expect you to have a rigorous performance evaluation. To provide
an estimate of the performance of the algorithms in the report, you can repeat
multiple times (e.g., 5 times) for each experiment by randomly sampling 90% data
from the whole dataset, and average the metrics on different subset. You are also
required to report the standard deviations.
3 Report
The report should be organized similar to research papers, and should contain the
following sections:
• In abstract, you should brieffy introduce the topic of this assignment and
describe the organization of your report.
• In introduction, you should ffrst introduce the main idea of NMF as well
as its applications. You should then give an overview of the methods you
want to use.
• In related work, you are expected to review the main idea of related NMF
algorithms (including their advantages and disadvantages).
• In methods, you should describe the details of your method (including
the deffnition of cost functions as well as optimization steps). You should
also describe your choices of noise and you are encouraged to explain the
robustness of each algorithm from theoretical view.
• In experiment, ffrstly, you should introduce the experimental setup (e.g.,
datasets, algorithms, and noise used in your experiment for comparison).
Second, you should show the experimental results and give some comments.
• In conclusion, you should summarize your results and discuss your insights
for future work.
4• In reference, you should list all references cited in your report and formatted
all references in a consistent way.
The layout of the report:
• Font: Times New Roman; Title: font size 14; Body: font size 12
• Length: Ideally 10 to 15 pages - maximum 20 pages
Note: Submissions must be typeset in LaTex using the provided template.
4 Submissions
Detailed instructions are as follows:
1. The submission contains two parts: report and source code.
(a) report (a pdf ffle): the report should include each member’s details
(student id and name).
(b) code (a compressed folder)
i. algorithm (a sub-folder): your code could be multiple ffles.
ii. data (an empty sub-folder): although two datasets should be inside
the data folder, please do not include them in the zip ffle. We will
copy two datasets to the data folder when we test the code.
2. The report (ffle type: pdf) and the codes (ffle type: zip) must be named
as student ID numbers of all group members separated by underscores. For
example, “xxxxxxxx xxxxxxxx xxxxxxxx.pdf”.
3. OOnly one student needs to submit your report (ffle type: pdf) to Assignment
1 (report) and upload your codes (ffle type: zip) to Assignment 1
(codes).
4. Your submission should include the report and the code. A plagiarism
checker will be used.
5. You need to clearly provide instructions on how to run your code in the
appendix of the report.
6. You need to indicate the contribution of each group member.
7. A penalty of minus 5 (5%) marks per each day after due (email late submissions
to TA and conffrm late submission dates with TA). Maximum delay is
10 days, after that assignments will not be accepted.
55 Marking scheme
Category Criterion Marks Comments
Report [80]
Abstract [3]
•problem, methods, organization.
Introduction [5]
•What is the problem you intend to solve?
•Why is this problem important?
Previous work [6]
•Previous relevant methods used in literature?
Methods [25]
•Pre-processing (if any)
•NMF Algorithm’s formulation.
•Noise choice and description.
Experiments and Discussions [25]
•Experiments, comparisons and evaluation
•Extensive analysis and discussion of results
•Relevant personal reflection
Conclusions and Future work [3]
•Meaningful conclusions based on results
•Meaningful future work suggested
Presentation [5]
•Grammatical sentences, no spelling mistakes
•Good structure and layout, consistent formatting
•Appropriate
citation and referencing
•Use graphs and tables to summarize data
Other [8]
•At the discretion of the marker: for impressing
the marker, excelling expectation,
etc. Examples include clear presentation,
well-designed experiment, fast code, etc.
6Category Criterion Marks Comments
Code [20]
•Code runs within a feasible time
•Well organized, commented and documented
Penalties [−]
•Badly written code: [−20]
•Not including instructions on how to run
your code: [−20]
Note: Marks for each category is indicated in square brackets. The minimum mark for the assignment will be 0 (zero).
相关推荐
Matlab实现使用遗传算法的混合能源系统优化.rar
Matlab实现使用遗传算法的混合能源系统优化.rar
机器学习(拓展)L1,L2-Norm理解
首先理解范数的概念L1、L2这种在机器学习方面叫做正则化,统计学领域的人喊她惩罚项,数学界会喊她范数。范数(norm)是数学中的一种基本概念。在泛函分析中,它定义在赋范线性空间中,并满足一定的条件,即①非负性;②齐次性;③三角不等式。它常常被用来度量某个向量空间(或矩阵)中的每个向量的长度或大小。L1就是曼哈顿距离L2就是欧式距离再理解什么是稀疏矩阵在矩阵中,若数值为0的元素数目远远多于非0元素的...
压液氧(LOX)火箭发动机涡轮泵级建立了一条自动化的基于模型的系统工程(MBSE)与多学科设计优化(MDO)流水线.rar
压液氧(LOX)火箭发动机涡轮泵级建立了一条自动化的基于模型的系统工程(MBSE)与多学科设计优化(MDO)流水线.rar
COMP5328 Python
1;2NMF).2.•RRE =∥Vˆ − WH∥F∥Vˆ ∥F. (1)1nXni=13 Report(codes).
在加性高斯白噪声和瑞利衰落信道上,针对BPSK_QPSK的误码率性能的MATLAB仿真,并扩展了相位优化的可重构智能表面辅助链路对比.rar
在加性高斯白噪声和瑞利衰落信道上,针对BPSK_QPSK的误码率性能的MATLAB仿真,并扩展了相位优化的可重构智能表面辅助链路对比.rar
python 操作海康威视工业相机资源例子--ParametrizeCamera_LoadAndSave.zip
python 操作海康威视工业相机资源例子--ParametrizeCamera_LoadAndSave
Foundation of ML (1)
Foundation of Machine Learning 读书笔记
基于斜坡补偿的Buck电路峰值电流+电压电流双闭环控制【附说明文档】(Simulink仿真实现)优快云首页发布文章优快云同步助手LLC谐振变换器开环+闭环软启动仿真设计(Simulink
内容概要:本文围绕三电平VIENNA整流器的双闭环控制与中点电位平衡问题展开仿真研究,提出了一种基于上下电容电压差值补偿的中点电位平衡策略。该策略在传统电压电流双闭环PI控制的基础上,引入电容电压差值作为反馈信号,通过SVPWM调制中冗余小矢量的时间分配实现中点电荷的定向调节,从而在不改变主控制结构的前提下有效抑制中点电位偏差。仿真结果表明,该方法不仅确保直流母线电压稳定跟踪800V给定值,还能显著提升上下电容电压的均衡度,同时保持输入电流低谐波水平,验证了控制策略的可行性和有效性。; 适合人群:电力电子、电气自动化及相关专业的研究生、科研人员及工程技术人员,具备一定的MATLAB/Simulink仿真基础和电力电子拓扑知识背景者更佳。; 使用场景及目标:①掌握三电平VIENNA整流器的工作原理与中点电位波动的成因;②理解电压电流双闭环PI控制的设计要点与参数整定原则;③学习基于差值补偿的中点电位平衡控制策略及其与SVPWM的协同机制;④应用于充电桩、航空电源、通信电源等中大功率单向整流场合的控制系统设计与优化。; 阅读建议:建议结合文中提供的仿真模型与参数设置进行动手实践,重点关注中点电位平衡投入前后电容电压波形的变化,对比分析不同工况下的系统动态响应,深入理解控制策略的作用机理。同时可进一步探索在电网不平衡、轻载等复杂工况下的控制性能,以拓展应用场景。
【FDE知识库】(1):AI 编程时代开发语言选型分析,云使用go,企业用java,算法python,底层c
AI 编程时代,开发语言选型需综合考量AI适配度、编译速度、跨平台与学习成本。Python以海量语料和即时执行成首选,适用于AI/ML与原型开发;TypeScript凭借类型系统与秒级构建,成为前端及应用层主流;Go以极速编译与统一风格,契合AI代理高效迭代需求。Rust/C++虽性能强,但编译慢、学习成本高,不适于快速试错。综合推荐:优先选Python、TypeScript、Go,兼顾效率与生态,实现最优AI协作体验。
自适应多机器人编队规划,以包围和跟踪具有运动和可见性约束的目标(Matlab代码实现)
内容概要:本文针对“自适应多机器人编队规划,以包围和跟踪具有运动和可见性约束的目标”开展研究,提出一种基于Matlab的仿真方法,实现多机器人在动态环境中对移动目标的协同包围与持续跟踪。该方法综合考虑了机器人的运动学约束与传感器的视线(visibility)限制,设计了分布式控制策略与自适应编队算法,能够在复杂环境下有效维持编队结构的稳定性和任务执行的鲁棒性。研究详细阐述了系统建模过程、控制律设计原理、编队形成与保持机制,并通过Matlab代码实现了完整的仿真验证,展示了算法在不同动态场景下的适应能力与性能优势; 适合人群:具备机器人学、自动控制理论、多智能体系统等相关基础知识,熟悉Matlab编程语言,从事智能系统、协同控制、路径规划与自主导航等方向的研究生、科研人员及工程技术人员; 使用场景及目标:①应用于安防监控、环境探测、灾害救援等场景中的多机器人目标围捕与跟踪任务;②为多智能体协同控制、分布式编队保持、避障与可见性维护等关键技术提供可复现的算法框架与仿真平台;③辅助高校与科研机构在相关领域的教学演示与科研创新,深化对自适应控制与分布式协同机制的理解; 阅读建议:建议读者结合提供的Matlab代码逐模块分析其实现逻辑,重点关注控制律设计、约束处理与自适应机制部分,可通过调整机器人数量、目标轨迹、传感器参数等进行扩展性实验,以深入掌握多机器人协同系统的动态行为与优化方法。
patch_1.23.0.2584_game_No6.android.pak
patch_1.23.0.2584_game_No6.android.pak
具有PWM控制VSC-HVDC链路的IEEE30总线传输系统(Simulink仿真实现)
内容概要:本文详细介绍了在Simulink环境中构建和仿真一个集成PWM控制的电压源换流器型高压直流输电(VSC-HVDC)链路的IEEE30节点电力传输系统的研究工作。该模型聚焦于利用PWM技术实现对VSC的高效、精确控制,以提升电力系统的传输效率、动态响应能力和运行稳定性。研究涵盖了系统整体建模、关键设备参数设计、PWM控制策略的实现、以及在标准IEEE30节点系统上的集成方法。通过一系列仿真测试,包括系统在正常运行、负载突变及故障条件下的动态响应,全面分析了VSC-HVDC链路对改善电网电压稳定性、优化潮流分布和增强系统可靠性的具体作用,充分验证了所提方案的有效性和工程应用价值。; 适合人群:具备电力系统分析、高压直流输电技术基础理论知识及Simulink/MATLAB仿真软件操作能力的高校研究生、科研机构研究人员和电力行业工程师。; 使用场景及目标:①作为教学案例,帮助学生深入理解VSC-HVDC的工作原理、控制策略及其在复杂电网中的集成应用;②为电力系统规划与运行人员提供一种可靠的仿真工具,用于评估新型输电技术对现有电网性能的影响,支持电网升级改造决策;③推动VSC-HVDC技术在远距离大容量输电、新能源并网和智能电网建设等领域的创新应用。; 阅读建议:建议读者在学习过程中,结合电力系统稳态与暂态分析的相关理论,重点关注PWM控制模块和VSC的建模细节,动手复现并调试所提供的Simulink模型,通过改变系统参数和运行工况来观察仿真结果的变化,从而深化对VSC-HVDC系统动态特性的理解。
状态估计【卡尔曼滤波kalman】UKF、EKF、粒子滤波PF学习与研究(Matlab代码实现)
内容概要:本文系统地研究了无迹卡尔曼滤波(UKF)、扩展卡尔曼滤波(EKF)和粒子滤波(PF)在非线性系统状态估计中的理论基础与实际应用,并结合Matlab代码实现进行了深入剖析。内容涵盖三种滤波算法的核心原理、数学推导及其在轨迹估计等工程问题中的具体实施方法。通过详尽的Matlab编程实例,展示了如何利用这些先进滤波技术解决如目标跟踪、传感器融合等复杂问题,并特别探讨了BP神经网络与EKF结合的优化训练策略以及粒子滤波在提高状态跟踪精度方面的潜力。该资料为希望掌握现代状态估计算法的研究人员和技术爱好者提供了一套完整的理论与实践指南; 适合人群:具备一定编程基础,尤其是熟练使用Matlab工具,且对控制理论、信号处理或相关工程技术领域有初步了解的研发人员和高校学生; 使用场景及目标:① 深入理解UKF、EKF和PF的基本概念及其在非线性动态系统中进行状态变量估计的应用;② 通过Matlab代码实践加深对各滤波器工作机制的理解,能够独立开发相应的算法以应对诸如轨迹预测、多源信息融合等实际挑战;③ 探索将BP神经网络与EKF相结合的新途径,以期提升模型的学习效率和预测准确性; 阅读建议:此资源不仅提供了坚实的理论支撑,还包括丰富的代码示例,建议读者按照文档结构循序渐进地学习,同时动手实现每一个案例,以便更深刻地把握各种滤波技术的关键细节。对于致力于深入研究状态估计领域的专业人士而言,这是一份极具价值的学习材料。
基于变频控制的多相交错LLC谐振变换器闭环仿真(Simulink仿真实现)
内容概要:本文详细介绍了基于变频控制的多相交错LLC谐振变换器的闭环仿真设计,重点阐述了其在Simulink环境下的建模与控制策略。通过多相交错技术有效降低输出纹波电流,提升系统效率与功率密度,并采用变频控制(PFM)实现对谐振变换器输出电压的精确调节。文中构建了完整的闭环控制系统,包含电压外环与电流内环,确保系统在负载变化或输入波动等扰动工况下仍能稳定运行。同时,配套提供了仿真模型、参数设计计算书及参考文献,帮助读者深入理解系统设计流程与关键技术细节,具有较强的工程复现价值。该资源适用于电力电子、新能源变换器等相关领域的仿真研究与教学实践。; 适合人群:具备电力电子基础知识,熟悉Simulink仿真工具,从事电源变换器设计、新能源系统研发或相关专业的研究生及工程技术人员。; 使用场景及目标:①掌握多相交错LLC谐振变换器的工作原理与变频控制机制;②学习并实现基于Simulink的闭环控制系统建模与仿真;③理解谐振参数设计、软开关实现及系统稳定性分析方法;④为科研项目、毕业设计或产品原型开发提供可复用的技术参考与仿真平台。; 阅读建议:建议读者结合提供的仿真模型与计算书,逐步完成系统搭建与参数整定,重点关注变频控制逻辑与闭环响应特性。在仿真过程中,可通过调整负载、输入电压等条件,观察系统的动态响应与稳态性能,加深对多相交错与谐振控制优势的理解。同时推荐参考相关文献,拓展对LLC变换器前沿控制策略的认识。
DXF、DWG工程制图文件查看器
DXF、DWG工程制图文件查看器。 可以在界面中进行测量(包括距离、面积、角度等等) 无需版权,放心使用。
含分布式电源的配电网可靠性评估研究(Matlab代码实现)
内容概要:本文围绕含分布式电源的配电网可靠性评估展开研究,基于Matlab代码实现相应的评估模型。研究内容涵盖分布式电源接入对配电网运行特性的影响,采用序贯蒙特卡洛模拟法等可靠性评估方法,对系统在不同运行场景下的供电可靠性指标进行量化分析。通过构建典型配电网模型,仿真分析分布式电源的位置、容量及出力特性对系统可靠性的影响机制,进而为提升配电网韧性与供电质量提供理论支撑和技术手段。研究不仅关注理论建模,还注重实际仿真流程的可操作性与结果的可视化呈现。; 适合人群:具备电力系统基础知识,从事配电网规划、运行与可靠性分析等相关领域的科研人员及工程技术人员,尤其适合研究生及从事新能源并网研究的1-3年工作经验的专业人员。; 使用场景及目标:①掌握含分布式电源的配电网可靠性评估基本理论与方法;②学习并复现主流可靠性评估算法(如蒙特卡洛模拟)的Matlab编程实现;③分析分布式电源接入对系统可靠性的影响规律,支撑配电网优化规划与运行决策。; 阅读建议:建议读者结合电力系统可靠性教材与本文Matlab代码同步学习,重点关注模型构建逻辑与算法实现细节,动手调试代码以加深对评估流程的理解,并尝试在不同网络结构和电源配置下进行仿真对比分析。
两路半桥LLC谐振变换器软开关Simulink仿真(模拟谐振参数不同、分裂电容)
内容概要:本文详细介绍了两路半桥LLC谐振变换器软开关的Simulink仿真研究,重点模拟了不同谐振参数及分裂电容对系统性能的影响。通过建立精确的电路模型,分析了软开关实现条件、谐振腔参数变化对电压电流波形、效率及功率传输能力的作用机制,探讨了分裂电容结构在改善均流特性与提升系统稳定性方面的优势。仿真结果有助于深入理解LLC变换器的工作原理与动态响应特性,为高频高效电源设计提供理论支持与优化方向。; 适合人群:电力电子、电气工程及其自动化等相关专业的科研人员、研究生及从事开关电源设计的工程师。; 使用场景及目标:①掌握LLC谐振变换器的基本建模与仿真方法;②研究谐振参数(如谐振电感、电容)对软开关过程的影响规律;③分析分裂电容结构在多路并联变换器中的均流与稳定性作用;④为高频高效DC-DC变换器的设计与优化提供仿真依据和技术参考。; 阅读建议:建议结合Simulink模型逐步操作,关注关键波形的观测点,对比不同参数下的仿真结果,深入理解软开关的实现条件与系统动态特性,同时可进一步拓展至效率分析与热管理设计。
[图解]SysML与EA实战:住宅安全系统接口块设计全解析
本文详细解析了使用SysML和EA工具进行住宅安全系统接口块设计的全流程。从系统上下文图入门到接口块实战技巧,涵盖块定义图与内部块图的视角转换,以及多图协同建模方法论。特别分享EA工具的高效操作指南和常见问题避坑建议,帮助工程师掌握精确信号定义、端口方向设置等关键技能,提升安防系统设计效率。
2万+



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



