SMALE魔鬼训练作业第四天与第五天

第四天

上午

题11.4

问题描述:写出该无向图的邻接矩阵.
答: [ 0 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 ] \begin{bmatrix} 0&1&1&1\\ 1&0&1&0\\ 1&1&0&1\\ 1&0&1&0\end{bmatrix} 0111101011011010

题11.5

问题描述:定义无向网络.
答:An undirected net is a tuple G = ( V , w ) \mathbf{G}=(\mathbf{V},w) G=(V,w),where V \mathbf{V} V is the set of nodes,and w : V × V → R w:\mathbf{V} \times \mathbf{V} \to \mathbb{R} w:V×VR is the weight function where w ( v i , v j ) w(v_i,v_j) w(vi,vj) is the weight of the edge ( v i , v j ) (v_i,v_j) (vi,vj) and satisfy w ( v i , v j ) = w ( v j , v i ) w(v_i,v_j)=w(v_j,v_i) w(vi,vj)=w(vj,vi).

下午

题12.4

1.自己画一棵树,将其元组各部分写出来(特别是函数 p p p).
答:树:
在这里插入图片描述
V = { v 0 , v 1 , v 2 , v 3 , v 4 , v 5 , v 6 , v 7 , v 8 , v 9 } ; \mathbf{V}=\{v_0, v_1,v_2, v_3, v_4, v_5, v_6, v_7, v_8, v_9\}; V={v0,v1,v2,v3,v4,v5,v6,v7,v8,v9};
r = v 0 ; r=v_0; r=v0;
p ( v 0 ) = ϕ , p ( v 1 ) = p ( v 2 ) = v 0 , p ( v 3 ) = p ( v 4 ) = v 1 , p ( v 5 ) = p ( v 6 ) = p ( v 7 ) = v 2 , p ( v 8 ) = p ( v 9 ) = v 5 . p(v_0)=\phi,p(v_1)=p(v_2)=v_0,p(v_3)=p(v_4)=v_1,p(v_5)=p(v_6)=p(v_7)=v_2,p(v_8)=p(v_9)=v_5. p(v0)=ϕ,p(v1)=p(v2)=v0,p(v3)=p(v4)=v1,p(v5)=p(v6)=p(v7)=v2,p(v8)=p(v9)=v5.
2.针对该树,将代码中的变量值写出来(特别是parent数组).
答: n = 10 ; n=10; n=10;
r o o t = 0 ; root=0; root=0;
p a r e n t [ 10 ] = { − 1 , 0 , 0 , 1 , 1 , 2 , 2 , 2 , 5 , 5 } . parent[10]=\{-1,0,0,1,1,2,2,2,5,5\}. parent[10]={1,0,0,1,1,2,2,2,5,5}.

晚上

题13.4

1.画一棵三叉树,并写出它的child数组.
答:三叉树:
在这里插入图片描述
c h i l d [ 8 ] [ 3 ] = { { 1 , 2 , 3 } , { 4 , − 1 , 5 } , { − 1 , − 1 , − 1 } , { 6 , − 1 , 7 } , { − 1 , − 1 , − 1 } , { − 1 , − 1 , − 1 } , { − 1 , − 1 , − 1 } , { − 1 , − 1 , − 1 } } child[8][3]=\{\{1,2,3\},\{4,-1,5\},\{-1,-1,-1\},\{6,-1,7\},\{-1,-1,-1\},\{-1,-1,-1\},\{-1,-1,-1\},\{-1,-1,-1\}\} child[8][3]={{1,2,3},{4,1,5},{1,1,1},{6,1,7},{1,1,1},{1,1,1},{1,1,1},{1,1,1}}.

2.按照本贴风格,重新定义树.提示:还是应该定义parent函数,字母表里面只有一个元素.
答:Let ϕ \phi ϕ be the empty node,a tree is a quadruple T = ( V , r , Σ , P ) T=(\mathbf{V},r,\Sigma,P) T=(V,r,Σ,P) where

  • V ≠ ∅ \mathbf{V} \ne \empty V= is the set of nodes;
  • r ∈ V r \in \mathbf{V} rV is the root node;
  • Σ = { p } \Sigma=\{p\} Σ={p} is the alphabet;
  • P : V × Σ ∗ → V P:\mathbf{V} \times \Sigma^* \to \mathbf{V} P:V×ΣV satisfying
    • ∀ v ∈ V , ∃ ! s ∈ Σ ∗ \forall v \in \mathbf{V},\exist !s\in \Sigma^* vV,!sΣ s.t. P ( v , s ) = r . P(v,s)=r. P(v,s)=r.

3.根据图、树、 m m m-叉树的学习,谈谈你对元组的理解.
答:元组可以将各不相同类型的成员变量组合起来,比如图能将集合与二元关系组合起来,树能将集合与函数结合起来去定义,这样的定义更加简洁明了,同时也打破了集合、函数、二元关等它们各自功能达不到的效果,把不同类型的元素结合,使得定义的描述更加简单、清晰.

第五天

上午

题:课堂练习

1.写出本例中的 U \mathbf{U} U C \mathbf{C} C D \mathbf{D} D V \mathbf{V} V.注:最后两个属性为决策属性.
答: U = { x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 } ; \mathbf{U}=\{x_1,x_2,x_3,x_4,x_5,x_6,x_7\}; U={x1,x2,x3,x4,x5,x6,x7};
C = { H e a d a c h e , T e m p e r a t u r e , L y m p h o c y t e , L e u k o c y t e , E o s i n o p h i l } ; \mathbf{C}=\{\mathrm{Headache,Temperature, Lymphocyte, Leukocyte, Eosinophil }\}; C={Headache,Temperature,Lymphocyte,Leukocyte,Eosinophil};
D = { H e a r t b e a t , F l u } ; \mathbf{D}=\{\mathrm{Heartbeat, Flu}\}; D={Heartbeat,Flu};
V = { Y e s , N o , H i g h , N o r m a l , L o w , A b n o r m a l } . \mathbf{V}=\{\mathrm{Yes, No, High, Normal, Low, Abnormal}\}. V={Yes,No,High,Normal,Low,Abnormal}.
2. I I I是怎么表示的?
答: I I I是符号决策表的内容,是针对用户 U \mathbf{U} U与条件属性 C \mathbf{C} C和决策属性 D \mathbf{D} D的内容,映射到表中的信息 V \mathbf{V} V.

题14.5

问题描述:定义一个标签分布系统,即各标签的值不是0/1,而是 [ 0 , 1 ] [0,1] [0,1]区间的实数,且同一对象的标签和为1.
答:A multi-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 satisfying ∀ i ∈ [ 1 , … , n ] , ∑ k = 1 l y i k = 1 \forall i \in[1,\dots,n] ,\sum_{k=1}^{l}y_{ik}=1 i[1,,n],k=1lyik=1,where 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.

晚上

题15.3

问题描述:找一篇你们小组的论文来详细分析数学表达式,包括其涵义、规范、优点和缺点.
答:论文:Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
在这里插入图片描述
涵义:如果 y y y来自于真实图片,那么Discriminator对 y y y的值 D Y ( y ) D_Y(y) DY(y)越大越好;如果是来自于Generator所产生的图片,即 G ( x ) G(x) G(x),那么Discriminator对 G ( x ) G(x) G(x)的值 D Y ( G ( x ) ) D_Y(G(x)) DY(G(x))越小越好.
在这里插入图片描述
涵义: F F F Y → X Y\rightarrow X YX的映射,如果是来自于Generator所产生的图片,即 G ( x ) G(x) G(x),再由 F F F反解回去 F ( G ( x ) ) F(G(x)) F(G(x)) x x x的差距越小越好;来自真实图片的 y y y同理.

优点:简洁明了易懂.
缺点:无.

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值