Code Monkey home page Code Monkey logo

practice_2023_fdu's Introduction

练习题

如何复现

现在的结果已经全部在./results文件夹中,如果需要复现结果可以将该文件夹中所有文件删除,并且运行如下:

复现习题一的所有结果,运行代码 cd code && python practice_1.py

复现习题二的所有结果,运行代码 cd code && python practice_2.py

复现习题三的所有结果,运行代码 cd code && python practice_3.py

习题一

Kmeans

用不同的随机数和超参,跑了100轮KMeans。

详细结果见"./results/practice_1_kmeans_detail.txt", 包涵初始类中心点;迭代次数;聚类结果(每类包含的样本,类中心);错误率。

实验结果汇总见"./results/practice_1_kmeans_summary.txt"。 目前最好的超参为迭代9次,平均ACC0.890,最优ACC0.893.

谱聚类

结果放在"./results/practice_1_spectral_cluster_detail.txt" 最优ACC可以打到0.9

习题二

最近邻分类

结果如图,详细结果放在"./results/practice_2_nearest_neighbors_classifier_detail_results.txt" fig1

PCA降维损失

结果如图,随着COMPONENTS数目的增多,复原图片之后的损失变得越来越小。 fig2

Eigenface+Fisherface(ACC最高)

结果如图,详细结果放在"./results/practice_2_pca_lda_detail_results.txt"。

我们可以看到并不是COMPONENTS数目越多越好。

但COMPONENTS=N_C时,分类效果最好。此时ACC=0.93。 fig3

Eigenface+SVM

结果如图,详细结果放在"./results/practice_2_pca_svm_detail_results.txt"。

和LDA一样,并不是COMPONENTS数目越多越好,但COMPONENTS=N_C时,分类效果最好。此时ACC=0.89 fig4

习题三

LLE可视化

将前十个分类画图如下: fig5

LLE+各种分类器

详细结果放在:

  • LDA: "./results/practice_3_lle_lda_detail_results.txt"、
  • SVM: "./results/practice_3_lle_svm_detail_results.txt"、
  • 逻辑回归: "./results/practice_3_lle_lr_detail_results.txt"。

SVM的结果如下图,COMPONENTS=45, 结果最好ACC=0.895 fig6 LDA的结果如下图,COMPONENTS=75, 结果最好ACC=0.92 fig7 逻辑回归的结果如下图,COMPONENTS=70, 结果最好ACC=0.89 fig8

practice_2023_fdu's People

Watchers

HouyiLi 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.