Latent Semantic Analysis (LSA) 測試

參考下列幾個網址寫出來的code (for Matlab)
http://lsa.colorado.edu/papers/dp1.LSAintro.pdf
https://blog.csdn.net/pipisorry/article/details/42560331
https://read01.com/zh-tw/0zeKRM.html#.W7C8PhMzbKZ

C=[ [ 0,0,1,1,0,0,0,0,0 ];
    [ 0,0,0,0,0,1,0,0,1 ];
    [ 0,1,0,0,0,0,0,1,0 ];
    [ 0,0,0,0,0,0,1,0,1 ];
    [ 1,0,0,0,0,1,0,0,0 ];
    [ 1,1,1,1,1,1,1,1,1 ];
    [ 1,0,1,0,0,0,0,0,0 ];
    [ 0,0,0,0,0,0,1,0,1 ];
    [ 0,0,0,0,0,2,0,0,1 ];
    [ 1,0,1,0,0,0,0,1,0 ];
    [ 0,0,0,1,1,0,0,0,0 ]; ];

[w,s,p]=svd(C);

plot(-p(:,2),-p(:,3),'.')
hold on
plot(-w(:,2),-w(:,3),'.')


Label_1={'book';'dads';'dummies';'estate';'guide';'investing';'market';'real';'rich';'stock';'value'};
text(-w(:,2),-w(:,3),Label_1,'Color','red','FontSize',14);

Label_2={'T1';'T2';'T3';'T4';'T5';'T6';'T7';'T8';'T9';};
text(-p(:,2),-p(:,3),Label_2,'Color','blue','FontSize',14);
hold off

結果呈現如下:

raspberry pi 關閉7寸觸控螢幕的方法

關閉:

sudo sh -c 'echo 1 > /sys/class/backlight/rpi_backlight/bl_power'

開啟:

sudo sh -c 'echo 0 > /sys/class/backlight/rpi_backlight/bl_power'

切換:

if [ "$(cat /sys/class/backlight/rpi_backlight/bl_power)" -eq "0" ]; then \
  sudo sh -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power"; \
else \
  sudo sh -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power"; fi