-
Notifications
You must be signed in to change notification settings - Fork 2k
Kmeans clustering exception #259
Description
I am getting the following exception
I believe my input is totally correct. I was computing cosine similarity over documents with TFIDF algorithm.
input to cluster.compute() is double[][] where 0>= input[i][j] <= 1
int[] index = cluster.Compute(inputs);
using https://github.com/primaryobjects/TFIDF for tfidf
System.InvalidOperationException was unhandled
HResult=-2146233079
Message=Generated value is not between 0 and 1.
Source=Accord.Statistics
StackTrace:
at Accord.Statistics.Distributions.Univariate.GeneralDiscreteDistribution.Random(Double[] probabilities)
at Accord.MachineLearning.KMeans.Randomize(Double[][] points, Boolean useSeeding)
at Accord.MachineLearning.KMeans.Compute(Double[][] data, Double threshold, Boolean computeInformation)
at TFIDFExample.Program.Main(String[] args) in C:\Users\jasim\Documents\Visual Studio 2015\Projects\TFIDF_TwitterClustering\TFIDFExample\Program.cs:line 49
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: