Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

almost weekly useful materials - 03/13 - #148

Open
GENZITSU opened this issue Mar 6, 2024 · 2 comments
Open

almost weekly useful materials - 03/13 - #148

GENZITSU opened this issue Mar 6, 2024 · 2 comments

Comments

@GENZITSU
Copy link
Owner

GENZITSU commented Mar 6, 2024

No description provided.

@GENZITSU
Copy link
Owner Author

GENZITSU commented Mar 8, 2024

独立成分分析(ICA)を使ってText Embeddingを分析してみた

解釈性の高い次元圧縮手法であるICAを元論文の単語ではなく文章に用いて文章のカテゴリングをしている記事

概要

景気ウォッチャーの「街角の景況感を判断するためのアンケート調査」データを対象に実施

OpenAIの「text-embedding-3-small」を利用

FastICAを用いて成分を抽出

# パラメータは論文内で指定されているものを参考にICAが収束したものを選択
ica = FastICA(n_components=n_components, random_state=42, max_iter=10000, tol=1e-3)
embeds_ica = ica.fit_transform(embeds)

df_ica = pd.DataFrame(embeds_ica)
skewness = skew(df_ica)
# 今回は正方向の独立成分を扱うため、歪度の大きい向きを正方向にしたい
# そこで、論文に従って歪度が負の軸を反転させている
df_ica *= np.sign(skewness)
df_ica.shape
>> (14818, 30)

独立成分の値に閾値を設けてカテゴリラベルを付与

image

そこからgpt-3.5-turboを用いて各カテゴリのラベル名を推定させる

また付与したラベルを用いて対応分析などをすることで、どのカテゴリがどれに影響を与えいるかの分析が可能

image

image

コメント

トピック分析的なことに使えるようで面白かった

出典

@GENZITSU
Copy link
Owner Author

GENZITSU commented Mar 8, 2024

GPT開発の悩みの種「速度」「精度」「評価」の壁をどう超えるか

MSのGAMOさんのスライド

勉強になったところ

コメント

出典

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant