Tom Mitchell (1998) Well-posed Learning Problem: A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.
Tom Mitchell 的定义更为现代和正式。在过滤垃圾邮件这个例子中,电子邮件系统会根据用户对电子邮件的标记(是/不是垃圾邮件)不断学习,从而提升过滤垃圾邮件的准确率,定义中的三个字母分别代表:
% The ; denotes we are going back to a new row. A = [1, 2, 3; 4, 5, 6; 7, 8, 9; 10, 11, 12] % Initialize a vector v = [1;2;3] % Get the dimension of the matrix A where m = rows and n = columns [m,n] = size(A) % You could also store it this way dim_A = size(A) % Get the dimension of the vector v dim_v = size(v) % Now let's index into the 2nd row 3rd column of matrix A A_23 = A(2,3)
执行结果:
A = 1 2 3 4 5 6 7 8 9 10 11 12 v = 1 2 3 m = 4 n = 3 dim_A = 4 3 dim_v = 3 1 A_23 = 6
3.2 Addition and Scalar Multiplication
Octave/Matlab 代码:
% Initialize matrix A and B A = [1, 2, 4; 5, 3, 2] B = [1, 3, 4; 1, 1, 1] % Initialize constant s s = 2 % See how element-wise addition works add_AB = A + B % See how element-wise subtraction works sub_AB = A - B % See how scalar multiplication works mult_As = A * s % Divide A by s div_As = A / s % What happens if we have a Matrix + scalar? add_As = A + s
% Initialize matrix A A = [1, 2, 3; 4, 5, 6;7, 8, 9] % Initialize vector v v = [1; 1; 1] % Multiply A * v Av = A * v
执行结果:
A = 1 2 3 4 5 6 7 8 9 v = 1 1 1 Av = 6 15 24
3.4 Matrix Matrix Multiplication
Octave/Matlab 代码:
% Initialize a 3 by 2 matrix A = [1, 2; 3, 4;5, 6] % Initialize a 2 by 1 matrix B = [1; 2] % We expect a resulting matrix of (3 by 2)*(2 by 1) = (3 by 1) mult_AB = A*B % Make sure you understand why we got that result
执行结果:
A = 1 2 3 4 5 6 B = 1 2 mult_AB = 5 11 17
3.5 Matrix Multiplication Properties
Octave/Matlab 代码:
% Initialize random matrices A and B A = [1,2;4,5] B = [1,1;0,2] % Initialize a 2 by 2 identity matrix I = eye(2) % The above notation is the same as I = [1,0;0,1] % What happens when we multiply I*A ? IA = I*A % How about A*I ? AI = A*I % Compute A*B AB = A*B % Is it equal to B*A? BA = B*A % Note that IA = AI but AB != BA
执行结果:
A = 1 2 4 5 B = 1 1 0 2 I = Diagonal Matrix 1 0 0 1 IA = 1 2 4 5 AI = 1 2 4 5 AB = 1 5 4 14 BA = 5 7 8 10
3.6 Inverse and Transpose
Octave/Matlab 代码:
% Initialize matrix A A = [1,2,0;0,5,6;7,0,9] % Transpose A A_trans = A' % Take the inverse of A A_inv = inv(A) % What is A^(-1)*A? A_invA = inv(A)*A
阿里云人工智能平台 PAI 团队发表的图像编辑算法论文在 MM2024 上正式亮相发表。ACM MM(ACM国际多媒体会议)是国际多媒体领域的顶级会议,旨在为研究人员、工程师和行业专家提供一个交流平台,以展示在多媒体领域的最新研究成果、技术进展和应用案例。其主题涵盖了图像处理、视频分析、音频处理、社交媒体和多媒体系统等广泛领域。此次入选标志着阿里云人工智能平台 PAI 在图像编辑算法方面的研究获得了学术界的充分认可。