Hi Joseph,
Try leveraging the fitrsvm function with the 'CacheSize' parameter. By setting 'CacheSize' to a value greater than 0, the function will cache the support vectors, allowing models to share common support vectors. Here's an example to illustrate this:
% Example code to fit SVM models with shared support vectors
X = randn(100,64); % Sample data
Y = randn(100,1); % Sample targets
% Fit SVM models with caching support vectors
models = cell(64,1);
for i = 1:64
models{i} = fitrsvm(X, Y, 'CacheSize', 1000);
end
% Access shared support vectors
shared_support_vectors = models{1}.SupportVectors;
disp(shared_support_vectors);
So, in the above code snippet example, each model shares support vectors due to the 'CacheSize' parameter, reducing storage requirements, so you can access shared support vectors from any model in the cell array which will help optimizing storage while maintaining model accuracy.