help needed in cosine similarity method

1 次查看(过去 30 天)
Dear experts i want to implement cosine similarity method take an example i have a matrix
[2 3 4 5 1;1 2 3 4 2;4 5 1 1 2]
i want to predict value now i will hide one of them and use this method so far i have coded cosine method like this
clc;
clear all;
close all;
load('Sample.mat');
load('Sample_Hidden.mat');
A=Sample;
B=Sample_Hidden;
C=cosineSimilarityNaive(A);
options = [];
options.Metric = 'Euclidean';
options.NeighborMode = 'KNN';
options.bNormalized=1;
options.k = 5;
options.WeightMode = 'Cosine';

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by