Rでk-Meansの実装に取り組んでいます。
個々のファイルから特徴ベクトルを計算し、それらをすべて、この方法で「ホルダー」と呼ばれるバッグに入れます。
holder[[filename]] <- c(featureVector)
次のように書くと、特定の特徴ベクトルを回復できます。
holder[["file3453.txt"]]
またはholder[[number]]
。
重心やその他の計算に特徴ベクトルを使用するので、特徴ベクトル V があると仮定すると、ホルダーからファイルの名前を取得するにはどうすればよいですか?
この質問は、次のように解釈することもできます。
値(特徴ベクトル)が与えられた場合、キー(ファイル名)をどのように決定できますか?