2

非線形次元削減のウィキ( https://en.wikipedia.org/wiki/Nonlinear_Dimensionity_reduction )を読んでいると、文字「A」の面白い例を見つけたので、Pythonで実装したいのですが、いくつか問題が発生しますここ。データの生成に使用するコードは次のとおりです。

import matplotlib.pyplot as plt
for scale in range(15):
    for rot in range(50):
    fig = plt.figure(figsize=(2, 2.05),facecolor='w')
    ax=plt.axes([0,0,1,1],frameon=False,xticks=[],yticks=[])    
    ax.text(0.5,0.5,'A',fontsize=150-scale*5,family='Times New Roman',
            fontdict={'ha':'center', 'va':'center'},
            rotation=rot*3.6)
    fig.savefig('./letterA/'+str(scale)+'s_r'+str(rot)+'.png',dpi=16)

次に、Waffles パッケージで pca とマニホールド スカルプティングを使用して次元削減を行いますが、wiki の図とは異なる結果が得られます。

4

0 に答える 0