机器学习中的特征可以是矩阵吗?

时间:2018-01-14 10:19:46

标签: machine-learning

如您所知,Iris数据集中的特征是一维数组,例如:

#!/bin/bash
gitLastCommit=$(git show --summary --grep="Merge pull request")
 if [[ -z "$gitLastCommit" ]]
 then
    lastCommit=$(git log --format="%H" -n 1)
else
    echo "We got a Merge Request!"
      arr=($gitLastCommit)
      lastCommit=${arr[4]}
  fi
echo $lastCommit

filesChanged=$(git diff-tree --no-commit-id --name-only -r $lastCommit)
  if [ ${#filesChanged[@]} -eq 0 ]; then
    echo "No files to update"
 else
    for f in $filesChanged
    do
        #do not upload these files that aren't necessary to the site
        if [ "$f" != ".travis.yml" ] && [ "$f" != "deploy.sh" ]
        then
            echo "Uploading $f"
            curl --ftp-create-dirs -T $f -u $FTP_USER:$FTP_PASS 
ftp://$FTP_ADDRESS/var/www/test/$f
        fi
    done
fi

我想知道机器学习中的功能是否可以是2d阵列? 例如:

curl: (28) Timeout was reached

谢谢!

1 个答案:

答案 0 :(得分:1)

是的,他们可以。在这种情况下,输入变为Tensors

0维输入 - 标量

1维输入 - 矢量

二维输入 - 矩阵

3(及以上)尺寸输入 - 张量

例如,图像是具有RGB分量的(m×n×p)张量。因此每个输入都是一个多维数字数组。它是一个矩阵矩阵 - This is an excellent explanation

Word嵌入也有些类似。单词构成一个文档。语料库是文档的集合。在这种情况下,每个单词通常是1 300个数字向量。所以文档将是一个矩阵 - 所以每个输入都是一个矩阵 - Start here