Giter Site home page Giter Site logo

dimension-reduction's Introduction

dimension-reduction

在这里,我实现了pca和mds两种不同的降维算法。同时,使用两种降维方法将鸢尾花数据集的特征数降低为2,并可视化。

Environment

python 3.7
pytorch 1.5
torchvision 0.6
opencv 3.4

Experiment

鸢尾花数据集的可视化结果如下所示,前者为pca算法的可视化结果,后者为mds算法的可视化结果。
image
image
两种算法对鸢尾花数据集降维后的结果相似,不过mds找到了一个与pca想法的子空间。
pca算法能够找到数据的主成分,对于一维线性相关数据,我们能够利用pca来找到两者之间的映射关系呢?所以,我额外进行了另外一个实验,使用pca求解一维线性相关数据的关系。在这里,我们只需要找到数据的第一个主要成分,该成分对应的特征向量即为一维数据之间的映射关系,结果如下所示:
image
该结果与regression项目中所求解的线性回归结果一致。

附录

word文档中的内容为我对线性变换和pca的理解:
image
image
image

dimension-reduction's People

Contributors

shuguoj avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.