'Octave Error: out of memory or dimension too large for Octave's index type

I am trying to run the following code in Octave. The variable "data" consists of 864 rows and 25333 columns.

clc; clear all; close all;

pkg load statistics

GEO = load("GSE59739.mat");
GEOT = tabulate(GEO.class)
data = GEO.data;
clear GEO

idx = kmeans(data,3,'Distance','cosine');
test1 = silhouette(data, idx, 'cosine');
xlabel('Silhouette Value')
ylabel('Cluster')

This is the error I get when trying to run the silhouette function: "error: out of memory or dimension too large for Octave's index type". Any idea on how I can fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source