当前位置: 首页 > news >正文

【AIE1001】Week 7, 8, 9, 10, 11

面向对象编程(Object-Oriented Programming, OOP)

Week 7 & Week 8

1. 对象与类(Objects and Classes)
  • 对象(Object):现实世界中可唯一识别的实体,具有身份、状态和行为
    An object represents an entity in the real world that can be distinctly identified.
  • 类(Class):对象的模板或蓝图,定义数据字段和方法
    A class is a blueprint for creating objects, defining data fields and methods.
  • 实例化(Instantiation):创建类的实例(对象)
    Creating an instance of a class is called instantiation.
2. 类的定义与构造函数(Class Definition and Constructor)
  • __init__方法:类的初始化方法,用于设置对象初始状态
    The__init__method is the initializer for a class.
  • self参数:指向当前对象的引用
    selfrefers to the current instance of the class.
  • 数据字段(Data Fields)/实例变量(Instance Variables):对象的状态
    Data fields store the state of an object.
  • 方法(Methods):对象的行为,可被调用
    Methods define the behavior of an object.
3. 封装与数据隐藏(Encapsulation and Data Hiding)
  • 私有数据字段(Private Data Fields):以__开头,只能在类内部访问
    Private fields start with__and can only be accessed within the class.
  • Getter 和 Setter 方法:提供对私有字段的受控访问
    Getter and setter methods provide controlled access to private fields.
4. 继承(Inheritance)
  • 子类(Subclass)与父类(Superclass):子类继承父类的属性和方法
    A subclass inherits attributes and methods from a superclass.
  • super()函数:调用父类的方法
    super()is used to call methods from the parent class.
  • 方法重写(Method Overriding):子类重新定义父类的方法
    Method overriding allows a subclass to modify a method defined in the superclass.
5. 多态与动态绑定(Polymorphism and Dynamic Binding)
  • 多态(Polymorphism):子类对象可被当作父类对象使用
    Polymorphism allows objects of a subclass to be treated as objects of the superclass.
  • 动态绑定(Dynamic Binding):运行时决定调用哪个方法
    Dynamic binding determines which method to invoke at runtime.
6. 特殊方法与对象类(Special Methods and the Object Class)
  • __str__:返回对象的字符串表示
    __str__returns a string representation of the object.
  • __eq__:比较两个对象是否相等
    __eq__checks equality between two objects.
  • object类:所有类的基类
    Theobjectclass is the base class for all classes in Python.
7. 多重继承(Multiple Inheritance)
  • 一个类可以从多个父类继承
    A class can inherit from more than one parent class.
  • 继承树(Inheritance Tree):表示类之间的继承关系
    Inheritance trees represent the hierarchical relationships between classes.
8. 类设计与抽象(Class Design and Abstraction)
  • 类抽象(Class Abstraction):隐藏实现细节,提供接口
    Class abstraction hides implementation details and provides an interface.
  • 类封装(Class Encapsulation):将数据和方法组合成对象
    Class encapsulation combines data and methods into a single object.
9. 练习与示例(Exercises and Examples)
  • CircleRectangleGeometricObject类的实现与继承
    Implementation and inheritance ofCircle,Rectangle, andGeometricObjectclasses.
  • TV类、BMI类、Loan类的设计
    Design ofTV,BMI, andLoanclasses.

数据结构与算法(Data Structures and Algorithms)

Week 9 & Week 10

1. 算法分析基础(Basics of Algorithm Analysis)
  • 时间复杂度(Time Complexity):衡量算法运行时间随输入规模增长的趋势
    Time complexity measures how runtime grows with input size.
  • 大O表示法(Big-O Notation):描述算法的渐近上界
    Big-O notation describes the upper bound of an algorithm’s growth rate.
  • 常见复杂度类别(Common Complexity Classes):
    • 常数时间 O(1)
    • 对数时间 O(log n)
    • 线性时间 O(n)
    • 线性对数时间 O(n log n)
    • 平方时间 O(n²)
    • 指数时间 O(2ⁿ)
2. 算法设计范例(Algorithm Design Paradigms)
  • 递归(Recursion):函数调用自身
    A function that calls itself.
  • 分治法(Divide and Conquer):将问题分解为更小的子问题
    Breaking a problem into smaller subproblems.
3. 搜索算法(Searching Algorithms)
  • 二分查找(Binary Search):在有序列表中查找元素
    Binary search finds an element in a sorted list in O(log n) time.
4. 排序算法(Sorting Algorithms)
  • 冒泡排序(Bubble Sort):重复比较相邻元素并交换
    Bubble sort repeatedly compares adjacent elements and swaps them if needed.
  • 快速排序(Quick Sort):使用分治法,选取基准进行分区
    Quick sort uses a pivot to partition the array into subarrays.
5. 基本数据结构(Basic Data Structures)
  • 栈(Stack):后进先出(LIFO)结构
    A stack is a Last-In-First-Out (LIFO) data structure.
  • 队列(Queue):先进先出(FIFO)结构
    A queue is a First-In-First-Out (FIFO) data structure.
  • 链表(Linked List):
    • 单链表(Singly Linked List)
    • 循环链表(Circularly Linked List)
    • 双向链表(Doubly Linked List)
  • 树(Tree):层次化数据结构,包含根节点、子节点等
    A tree is a hierarchical data structure with a root and children.
6. 数据结构的实现与应用(Implementation and Applications)
  • 使用列表实现栈和队列
    Implementing stacks and queues using lists.
  • 使用链表实现栈和队列
    Implementing stacks and queues using linked lists.
  • 栈的应用:括号匹配、HTML标签匹配
    Applications of stacks: bracket matching, HTML tag matching.
  • 队列的应用:网页服务模拟、轮询调度
    Applications of queues: web service simulation, round-robin scheduling.

大语言模型简介(Introduction to Large Language Models)

Week 11

1. 大语言模型基础(Basics of LLMs)
  • 什么是大语言模型(What are LLMs):基于Transformer架构,通过大量文本训练
    LLMs are transformer-based models trained on vast amounts of text.
  • 下一个词预测(Next Token Prediction):LLM的核心任务
    The core task of an LLM is to predict the next token in a sequence.
2. 训练与对齐(Training and Alignment)
  • 预训练(Pre-training):在无标签数据上训练
    Training on unlabeled data.
  • 微调(Fine-tuning):在有标签数据上调整
    Adjusting the model on labeled data.
  • 基于人类反馈的强化学习(RLHF):使用人类反馈优化模型输出
    Reinforcement Learning from Human Feedback optimizes model outputs.
3. 上下文工程与提示工程(Context Engineering and Prompt Engineering)
  • 系统提示(System Prompt):定义模型的角色和行为
    System prompts define the model’s persona and behavior.
  • 用户提示(User Prompt):用户输入的指令或问题
    User prompts are the instructions or questions from the user.
  • 上下文管理(Context Management):如何有效组织输入信息
    Managing how information is organized in the input context.
4. 工具使用与外部资源(Tool Use and External Resources)
  • 检索增强生成(RAG):结合外部知识库
    Retrieval-Augmented Generation combines external knowledge bases.
  • 工具调用(Tool Calling):模型调用外部工具(如搜索、计算)
    Models can call external tools like search engines or calculators.
  • 计算机使用(Computer Use):模型通过键盘鼠标操作计算机
    Models can operate computers via keyboard and mouse.
5. 智能体与多智能体系统(Agents and Multi-Agent Systems)
  • AI智能体(AI Agent):能够自主执行任务的系统
    An AI agent can autonomously perform tasks.
  • 多智能体协作(Multi-Agent Collaboration):多个智能体分工合作
    Multiple agents collaborate to complete complex tasks.
6. 模型选择与使用建议(Model Selection and Usage Tips)
  • 开源与闭源模型(Open-source vs. Closed-source Models)
  • 如何选择合适的模型(How to Choose the Right Model)
  • 学习资源与社区(Learning Resources and Communities)
http://www.jsqmd.com/news/98580/

相关文章:

  • 打工人是怎么跟打工魂兼容的!
  • Qwen3-8B与vLLM协同推理实战
  • 2025年防滑牛皮纸厂家权威推荐榜:高摩擦工业包装与创意手工优选,实力品牌深度解析 - 品牌企业推荐师(官方)
  • uniapp+springboot基于微信小程序的方言粤语文化传播平台的设计与开发_4b942thb_论文
  • 完整教程:技术演进中的开发沉思-199 JavaScript: YUI 高级交互动画
  • 2025年10月中国管理咨询公司推荐:权威榜单与深度对比评测报告 - 十大品牌推荐
  • 【前端】【canvas】【pixi.js】水波纹滤镜实现教程 - 支持随机波动与鼠标交互
  • 《P2152 [SDOI2009] SuperGCD》
  • 2025年12月祛痘沐浴露推荐排行榜单:十强品牌深度评测对比与科学选购指南 - 十大品牌推荐
  • 性价比高的物联网网关开发哪个哪家强
  • Qwen3-14B-MLX-4bit的长文本处理与YaRN扩展
  • 2025年12月祛痘沐浴露推荐排行榜:十款热门产品深度评测与选购指南 - 十大品牌推荐
  • LangFlow工作流实时预览功能详解及其应用场景
  • Qwen3-VL-30B显存需求全解析:不同精度下的真实占用
  • 2025年12月祛痘沐浴露推荐:十款热门产品深度对比与效果评测榜 - 十大品牌推荐
  • 24、Linux文件系统:ext2、ext3与ReiserFS深度解析(上)
  • uniapp+springboot基于微信小程序的考研资源共享平台的设计与实现_b7qm8367_cc181
  • 2025年易久伺服压装系统权威推荐:精密装配领域技术口碑与市场表现解析 - 十大品牌推荐
  • C++日志系统支持网络输出
  • 雪深监测站:积雪厚度与降雪总量的信息采集
  • 20万以内城市代步新能源SUV排行榜:6款纯电动低养车成本车型深度解析
  • 好用的物联网网关开发机构
  • 爱玩机工具箱 S-22.1.0.1,强大的手机玩机刷机模块工具箱,免Root也能隐藏应用
  • 2025 年值得选择的 TVC 视频制作服务推荐
  • 如何用GPT-SoVITS实现高质量语音合成?开源方案全解析
  • Niagara Launcher V1.15.4 分享:独一无二的安卓第三方桌面,修复部分问题
  • 过碳酸钠厂家推荐:优质供应商、批发商及制造商大全 - 品牌2026
  • 汽车零部件检测的未来:全尺寸、全链条、全生命周期管理
  • 易语言数据库操作:结构化数据管理的核心
  • uniapp+springboot档案馆参观预约系统 微信小程序_x0af865x_论文