Clear Filters
Clear Filters

help needed in cosine similarity method

1 view (last 30 days)
abdul wahab  aziz
abdul wahab aziz on 26 Aug 2016
Edited: Azzi Abdelmalek on 26 Aug 2016
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';

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!