Course3 Types of Learning

本文介绍了机器学习中的不同任务类型,包括二元与多元分类、回归、结构化学习等,并探讨了监督式、非监督式、半监督式及增强学习的不同特点。此外,还讨论了批量学习、在线学习和主动学习等学习协议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注明: 文章中所有的图片均来自台湾大学林轩田《机器学习基石》课程,供自己学习使用,侵删

一、Learning with Different Output Space Y

1、两元分类

二元分类是机器学习领域非常核心和基本的问题。二元分类有线性模型 也有非线性模型,根据实际问题情况,选择不同的模型。

2、多元分类

将1、5、10、25硬币分类

3、回归

二元分类和多元分类都属于分类问题,它们的输出都是离散值。二对于另外一种情 况,比如训练模型,预测房屋价格、股票收益多少等,这类问题的输出y=R,即范围 在整个实数空间,是连续的。这类问题,我们把它叫做回归(Regression)。最简单 的线性回归是一种典型的回归模型。

4、结构化学习

简单总结一下,机器学习按照输出空间划分的话,包括二元分类、多元分类、回归、 结构化学习等不同的类型。其中二元分类和回归是最基础、最核心的两个类型,也是 我们课程主要介绍的部分

5、例题

二、Learning with Different Data Label yn

1、监督式学习

如果我们拿到的训练样本D既有输入特征x,也有输出yn,那么我们把这种类型的学习 称为监督式学习(Supervised Learning)。监督式学习可以是二元分类、多元分类或 者是回归,最重要的是知道输出标签yn。

有铜板的概念,比如2,5,10分等y输出,也有各自铜板的重量等x输入

2、非监督式学习

非监督式学习是没有输出标签yn的,典型的非监 督式学习包括:聚类(clustering)问题,比如对网页上新闻的自动分类;密度估计, 比如交通路况分析;异常检测,比如用户网络流量监测。通常情况下,非监督式学习 更复杂一些,而且非监督的问题很多都可以使用监督式学习的一些算法思想来实现

没有确定铜板的概念,根据铜板的重量等x输出确定

3、半监督式学习

介于监督式和非监督式学习之间的叫做半监督式学习(Semi­supervised Learning)。顾名思义,半监督式学习就是说一部分数据有输出标签yn,而另一部分 数据没有输出标签yn。在实际应用中,半监督式学习有时候是必须的,比如医药公司 对某些药物进行检测,考虑到成本和实验人群限制等问题,只有一部分数据有输出标 签yn。

4、增强学习

我们给模型或系统一些输入,但是给不了我们希望的真实的输出y,根据模型的输出反馈,如果 反馈结果良好,更接近真实输出,就给其正向激励,如果反馈结果不好,偏离真实输出,就给其反向激励。不断通过“反馈­修正”这种形式,一步一步让模型学习的更好, 这就是增强学习的核心所在。

增强学习可以类比成训练宠物的过程,比如我们要训练 狗狗坐下,但是狗狗无法直接听懂我们的指令“sit down”。在训练过程中,我们给狗狗 示意,如果它表现得好,我们就给他奖励,如果它做跟sit down完全无关的动作,我 们就给它小小的惩罚。这样不断修正狗狗的动作,最终能让它按照我们的指令来行 动。实际生活中,增强学习的例子也很多,比如根据用户点击、选择而不断改进的广 告系统

简单总结一下,机器学习按照数据输出标签yn划分的话,包括监督式学习、非监督式 学习、半监督式学习和增强学习等。其中,监督式学习应用最为广泛。

5、例题

三、Learning with Different Protocol f(xn,yn)

1、按照不同的协议,机器学习可以分为三种类型:

Batch Learning (批量学习)

Online 

Active Learning(主动学习)

batch learning是一种常见的类型。batch learning获得的训练数据D是一批的,即一次 性拿到整个D,对其进行学习建模,得到我们最终的机器学习模型。batch learning在 实际应用中最为广泛。

online是一种在线学习模型,数据是实时更新的,根据数据一个个进来,同步更新我 们的算法。比如在线邮件过滤系统,根据一封一封邮件的内容,根据当前算法判断是 否为垃圾邮件,再根据用户反馈,及时更新当前算法。这是一个动态的过程。之前我 们介绍的PLA和增强学习都可以使用online模型。

active learning是近些年来新出现的一种机器学习类型,即让机器具备主动问问题的能 力,例如手写数字识别,机器自己生成一个数字或者对它不确定的手写字主动提问。 active learning优势之一是在获取样本label比较困难的时候,可以节约时间和成本,只 对一些重要的label提出需求。

2、小测验

四、Learning with Different Input Space X

1、concrete features(具体特征)

输入X的第一种类型就是concrete features。比如说硬币分类问题中硬币的尺寸、重量 等;比如疾病诊断中的病人信息等具体特征。concrete features对机器学习来说最容 易理解和使用。

2、raw features(原始特征)

第二种类型是raw features。比如说手写数字识别中每个数字所在图片的mxn维像素 值;比如语音信号的频谱等。raw features一般比较抽象,经常需要人或者机器来转换 为其对应的concrete features,这个转换的过程就是Feature Transform。

3、abstract features(抽象特征)

第三种类型是abstract features。比如某购物网站做购买预测时,提供给参赛者的是抽 象加密过的资料编号或者ID,这些特征X完全是抽象的,没有实际的物理含义。所以 对于机器学习来说是比较困难的,需要对特征进行更多的转换和提取。

五、总结

 

 

 

 

 

 

### BUU LFI Course Materials and Resources #### Overview of the Local File Inclusion (LFI) Vulnerability Local File Inclusion vulnerabilities occur when a web application allows user input to specify which files should be included dynamically within the server-side script, such as PHP's `include` or `require`. If not properly sanitized, this can lead to unauthorized access to sensitive system files or even remote code execution. In the context of BUU LFI courses, participants are introduced to various techniques for exploiting these types of vulnerabilities through practical exercises. The primary focus is on understanding how improper handling of file paths leads to security risks[^1]. #### Practical Example from BUU LFI Courses One specific example involves an exercise where users must exploit a vulnerable parameter named 'file'. By manipulating URL parameters like so: ``` http://example.com/index.php?file=../../../../etc/passwd ``` Participants learn that traversing directories using sequences of '../' enables them to reach higher-level folders until reaching critical areas containing flags or other important data points[^2]. For instance, accessing the flag might involve navigating back several levels relative to the current working directory by specifying multiple parent-directory references (`../../..`) before pointing towards the target resource ('flag'). ```bash http://target-url/?file=../../../flag ``` This demonstrates both theoretical knowledge about path traversal attacks alongside hands-on experience with real-world exploitation scenarios provided during training sessions at platforms similar to those described above[^5]. #### Detecting Server Environment Through Error Messages Another aspect covered includes methods for identifying whether the underlying operating system running behind-the-scenes is Windows or Linux based solely upon error messages returned after attempting invalid inputs via query strings attached directly onto URLs[^4]: - **Windows**: Typically shows errors related to missing semicolons (;), colons (:), etc., often associated with incorrect syntax used while trying to reference local filesystem objects. - **Linux/Unix-like Systems**: May display permission denied issues due to restricted permissions set against certain protected locations outside public_html directories unless explicitly allowed otherwise. Understanding differences between OS-specific behaviors helps refine attack vectors tailored specifically toward bypassing defenses present under different environments encountered throughout challenges posed within CTF competitions hosted online. --related questions-- 1. How does one differentiate between absolute vs relative paths in crafting payloads targeting LFI flaws? 2. What measures can developers take to prevent LFI vulnerabilities effectively? 3. Can you explain why it’s crucial to sanitize all forms of external input thoroughly prior to processing inside scripts responsible for including external resources? 4. Are there any tools recommended for automating detection and exploitation processes concerning LFI weaknesses found across diverse applications built over varying technologies stacks? 5. Describe common pitfalls beginners face learning about LFI exploits and suggest ways they could improve their skills progressively without compromising personal systems unintentionally.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值