决策树
决策树决策树模型分类决策树模型是一种描述对实例进行分类的树形结构 决策树由以下内容组成: 结点 (node) 内部结点 (internal node) 表示一个特征或属性 叶结点 (leaf node) 表示一个类 有向边 (directed edge) 用决策树分类,从根结点开始,对实例的某一特征进行测试,根据测试结果,将实例分配到其子结点;这时,每一个子结点对应着该特征的一个取值。如此递归地对实例进行测试并分配,直至达到叶结点。最后将实例分到叶结点的类中 ![[images/截屏2026-03-30 13.16.50.png]] if-then 规则决策树的路径(或其对应的 if-then 规则集合)具有:互斥并完备的特性。即每一个实例都被且仅被一条路径或者一条规则覆盖 条件概率分布决策树表示给定特征条件下类的条件概率分布 这一条件概率分布定义在特征空间的一个划分 (partition)上 将特征空间划分为互不相交的单元 (cell) 或区域 (region) ,并在每个单元定义一个类的概率分布就构成了一个条件概率分布 决策树的一条路径对应于划分中...
Flex & Bison
一、macOS + VSCode 配置 Flex/Bison 完整步骤(你已用 brew 安装)1. 确认版本与环境变量(关键:mac 自带旧版,必须用 brew 新版)打开终端: # 查看 flex/bison 路径(必须是 /usr/local/opt 或 /opt/homebrew/opt) which flex bison # 查看版本(flex ≥2.6,bison ≥3.8) flex --version bison --version Intel Mac:brew 路径 → /usr/local/opt/flex/bin、/usr/local/opt/bison/bin Apple Silicon (M1/M4):brew 路径 → /opt/homebrew/opt/flex/bin、/opt/homebrew/opt/bison/bin 配置环境变量(覆盖系统旧版): # Intel Mac echo 'export PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison...
Kubernetes ConfigMap and Secret
Concept of ConfigMap![[images/截屏2026-03-25 16.16.53.png]] ConfigMap provides a way to store configuration information and provides it to containers. Provides a way to inject configuration data into a container. Can store entire files or provide key-value pairs Store in a File. Key is the filename, value is the file contents Can be JSON, XML, k-v, … ConfigMap can be accessed from a Pod with: Environment variables (k-v) ConfigMap Volume (access as files) ![[images/截屏2026-03-25 1...
Kubernetes Deployment
Concepts![[images/截屏2026-03-24 11.44.48.png]] A ReplicaSets is a declarative way to manage Pods. A Deployment is a declarative way to manage Pods using a ReplicaSet. Deployments are a higher-level resource that define one or more Pod templates. Deployments and ReplicaSets ensure Pods stay running and can be used to scale Pods. ReplicaSetsReplicaSets act as a Pod controller Self-healing mechanism Ensure the requested number of Pods are available Provide fault-tolerance Can be used to s...
Kubernetes Storage
Concept![[images/截屏2026-03-24 16.45.32.png]] A Volume can be used to hold data and state for Pods and containers. A Pod can have multiple Volumes attached to it. Containers rely on a mountPath to access a volume. Storage Types Volumes PersistentVolumes PersistentVolumeClaims StorageClasses Volumes A Volume references a storage location Must have a unique name Attached to a Pod and may or may not be tied to the Pod’s lifetime (depending on the Volume type) A Volume Mount references a V...
Kubernetes Service
Concept![[images/截屏2026-03-24 14.50.56.png]] A Service provides a single point of entry for accessing one or more Pods. Can’t rely on Pod IP Pods are motral and may only live a short time. (ephemeral) Pod IP address may not stay the same. Pods can be horizontally scaled so each Pod gets its own IP address. A Pod gets an IP address after it has been scheduled (no way for clients to know IP ahead of time). Service Do Services abstract Pod IP addresses from consumers. Load balances betwee...
朴素贝叶斯法
学习与分类训练数据集由 $P(X,Y)$ 独立同分布产生 参数估计极大似然估计学习与分类算法
无标题
参考:https://blog.csdn.net/kikiLQQ/article/details/132888160
词法分析
词法分析程序设计词法分析程序和语法分析程序的接口方式词法分析程序完成的是编译第一阶段的工作,可以有以下方法: 独立的一遍,把字符流的源程序变成单词序列,输出到一个中间文件,这个文件作为语法分析程序的输入而继续编译过程 词法分析程序每得到一次调用,就从源程序文件中读入一些字符,直到识别出一个单词,或者直到下一个单词的第一个字符为止。可以节省中间文件或存储区 ![[images/截屏2026-04-08 10.08.57.png]] 词法分析程序输出当语法分析程序接收到下一个单词的请求时,另词法分析程序从左到右读入源程序的字符流,以识别下一个单词。 在识别出下一个单词同时验证其词法正确性之后,词法分析程序将结果以单词符号的形式发送至语法分析程序以回应其请求;若发现词法错误则返回出错信息 单词分类 关键字/保留字 标识符 常数 运算符 界符 表达式使用二元式表示: $$(\text{单词种类},\text{单词值})$$ 对于部分单词,除了需要值,还需要其他信息。如对标识符,还需要记录类别、层次以及其他属性,可以将这些属性全部收集在符号表中,设计成: $$(\...