2021夏数学表达式魔训(2)

数学表达式魔训

Day 5

5.1 图与网络

Definition :An undirected network is a tuple G = ( V , E , W ) G = (\mathbf{V}, \mathbf{E}, \mathbf{W}) G=(V,E,W), where V \mathbf{V} V is the set of nodes, E ⊆ V × V \mathbf{E} \subseteq \mathbf{V} \times \mathbf{V} EV×V, where ( v i , v j ) ∈ E ⇔ ( v j , v i ) ∈ E (v_i, v_j) \in \mathbf{E} \Leftrightarrow (v_j, v_i) \in \mathbf{E} (vi,vj)E(vj,vi)E is the set of edges.
w i j ∈ W w_{ij} \in \mathbf{W} wijW is the weighted of ( v i , v j ) (v_i, v_j) (vi,vj), where w i j = w j i w_{ij} = w_{ji} wij=wji.

5.2

在这里插入图片描述

  1. Let ϕ \phi ϕ be the empty node, a tree is a triple T = ( A , r , p ) T=(\mathbf{A}, r, p) T=(A,r,p) where
    ∙ A = { A 0 , A 1 , … , A 6 } ≠ ϕ \bull \mathbf{A} =\{A_0, A_1, \dots, A_6\}\neq\phi A={A0,A1,,A6}=ϕ is the set of nodes;
    ∙ r ∈ A \bull r \in \mathbf{A} rA is the root node;
    ∙ p : A → A ∪ { ϕ } \bull p: \mathbf{A} \to\mathbf{A} \cup\{\phi\} p:AA{ϕ} is the parent mapping satisfying;
       ∙ p ( r ) = ϕ \bull p(r) = \phi p(r)=ϕ
        ∙ ∀ a ∈ A , ∃ ! n ≥ 0 ,  st.  p ( n ) ( a ) = r \bull \forall a \in \mathbf{A}, \exists ! n \geq 0, \text { st. } p^{(n)}(a) = r aA,!n0, st. p(n)(a)=r
  2. n=6;root=0;
    parent[0]=-1; parent[1]=0; parent[2]=0; parent[3]=1;
    parent[4]=1; parent[5]=2; parent[6]=2;
    code:
public class Tree {
	/**
	 * 节点数. 表示节点 A_0 至 A_{n-1}.
	 */
	int n;
	
	/**
	 * 根节点. 0 至 n-1.
	 */
	int root;
	
	/**
	 * 父节点.
	 */
	int[] parent;

	/**
	 * 构造一棵树, 第一个节点为根节点, 其余节点均为其直接子节点, 也均为叶节点.
	 */
	public Tree(int paraN) {
		n = paraN;
		parent = new int[n];
		parent[0] = -1; // -1 即 \phi
	}// Of the constructor
}//Of class Tree

5.3 m叉树

  1. child 数组:
    { ( 1 , 2 , 3 ) ; ( 4 , − 1 , 5 ) ; ( − 1 , − 1 , 6 ) ; ( − 1 , − 1 , − 1 ) ; ( − 1 , − 1 , − 1 ) ; ( − 1 , − 1 , − 1 ) ; ( − 1 , − 1 , − 1 ) } \{(1, 2, 3); (4, -1, 5); (-1, -1, 6); (-1, -1, -1); (-1, -1, -1); (-1, -1, -1); (-1, -1, -1)\} {(1,2,3);(4,1,5);(1,1,6);(1,1,1);(1,1,1);(1,1,1);(1,1,1)}在这里插入图片描述

  2. Let ϕ \phi ϕ be the empty node, a tree is a triple T = ( A , r , Σ , c ) T=(\mathbf{A}, r, \Sigma, c) T=(A,r,Σ,c) where
    ∙ A ≠ ϕ \bull \mathbf{A} \neq \phi A=ϕ is the set of nodes;
    ∙ r ∈ A \bull r \in \mathbf{A} rA is the root node;
    ∙ Σ = { 0 } \bull \Sigma = \{0\} Σ={0} is the alphabet;
    ∙ c : ( A ∪ { ϕ } ) × Σ ∗ → A ∪ { ϕ } \bull c: (\mathbf{A} \cup \{\phi\}) \times \Sigma^{*} \rightarrow \mathbf{A} \cup\{\phi\} c:(A{ϕ})×ΣA{ϕ} satisfying ;
       ∙ ∀ a ∈ A , ∃ ! s ∈ Σ ∗  s.t.  c ( r , s ) = a \bull \forall a \in \mathbf{A}, \exists ! s \in \Sigma^{*} \text { s.t. } c(r, s) = a aA,!sΣ s.t. c(r,s)=a

Day 6

6.1 决策表

A label distribution system is a tuple S = ( X , Y ) S = (\mathbf{X}, \mathbf{Y}) S=(X,Y) where X = [ x i j ] n × m ∈ R n × m \mathbf{X} = [x_{ij}]_{n \times m} \in \mathbb{R}^{n \times m} X=[xij]n×mRn×m is the data matrix, Y = [ y i k ] n × l ∈ [ 0 , 1 ] n × l \mathbf{Y} = [y_{ik}]_{n \times l} \in [0, 1]^{n \times l} Y=[yik]n×l[0,1]n×l is the label matrix, s.t. ∑ k = 1 l y i k = 1 \sum_{k = 1}^l y_{ik} = 1 k=1lyik=1, n n n is the number of instances, m m m is the number of features, and l l l is the number of labels.

6.2 示例讲解

min ⁡ v ( j ) E ( v ( j ) ) = ∑ i = 1 l L ( y i , g ( j ) ( x i ) ) + ∑ i = l + 1 l + u v i ( j ) L ( g ‾ ( j − 1 ) ( x i ) , g ( j ) ( x i ) ) \min_{ \mathbf{v}^{(j)}} E\left( \mathbf{v}^{(j)}\right)= \sum_{i = 1}^{l} L\left(y_{i}, g^{(j)}(\mathbf{x}_{i})\right) + \sum_{i=l+1}^{l+u}v_{i}^{(j)}L\left(\overline{g}^{(j-1)}{(\mathbf{x}_i)}, g^{(j)}(\mathbf{x}_{i})\right) minv(j)E(v(j))=i=1lL(yi,g(j)(xi))+i=l+1l+uvi(j)L(g(j1)(xi),g(j)(xi))
涵义:在第 j j j个视角上,在输入为 v ( j ) \mathbf{v}^{(j)} v(j) 的情况下,使模型在标记数据与伪标记数据上的预测损失最小。
优点:简介明了,变量名为出现混用的情况。
缺点:无法一次性讲整个多个视角之间的优化情况写出。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值