{"action":"created","issue":{"url":"https://api.github.com/repos/accord-net/framework/issues/259","repository_url":"https://api.github.com/repos/accord-net/framework","labels_url":"https://api.github.com/repos/accord-net/framework/issues/259/labels{/name}","comments_url":"https://api.github.com/repos/accord-net/framework/issues/259/comments","events_url":"https://api.github.com/repos/accord-net/framework/issues/259/events","html_url":"https://github.com/accord-net/framework/issues/259","id":162970628,"number":259,"title":"Kmeans clustering exception","user":{"login":"khan990","id":2551269,"avatar_url":"https://avatars.githubusercontent.com/u/2551269?v=3","gravatar_id":"","url":"https://api.github.com/users/khan990","html_url":"https://github.com/khan990","followers_url":"https://api.github.com/users/khan990/followers","following_url":"https://api.github.com/users/khan990/following{/other_user}","gists_url":"https://api.github.com/users/khan990/gists{/gist_id}","starred_url":"https://api.github.com/users/khan990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khan990/subscriptions","organizations_url":"https://api.github.com/users/khan990/orgs","repos_url":"https://api.github.com/users/khan990/repos","events_url":"https://api.github.com/users/khan990/events{/privacy}","received_events_url":"https://api.github.com/users/khan990/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-29T16:31:07Z","updated_at":"2016-11-14T09:03:10Z","closed_at":null,"body":"I am getting the following exception\nI believe my input is totally correct. I was computing cosine similarity over documents with TFIDF algorithm.\n\ninput to cluster.compute() is double[][] where        0>= input[i][j] <= 1\n`int[] index = cluster.Compute(inputs);`\n\nusing https://github.com/primaryobjects/TFIDF for tfidf\n\n> System.InvalidOperationException was unhandled\n>   HResult=-2146233079\n>   Message=Generated value is not between 0 and 1.\n>   Source=Accord.Statistics\n>   StackTrace:\n>        at Accord.Statistics.Distributions.Univariate.GeneralDiscreteDistribution.Random(Double[] probabilities)\n>        at Accord.MachineLearning.KMeans.Randomize(Double[][] points, Boolean useSeeding)\n>        at Accord.MachineLearning.KMeans.Compute(Double[][] data, Double threshold, Boolean computeInformation)\n>        at TFIDFExample.Program.Main(String[] args) in C:\\Users\\jasim\\Documents\\Visual Studio 2015\\Projects\\TFIDF_TwitterClustering\\TFIDFExample\\Program.cs:line 49\n>        at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)\n>        at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\n>        at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\n>        at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\n>        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\n>        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\n>        at System.Threading.ThreadHelper.ThreadStart()\n>   InnerException: \n"},"comment":{"url":"https://api.github.com/repos/accord-net/framework/issues/comments/260282233","html_url":"https://github.com/accord-net/framework/issues/259#issuecomment-260282233","issue_url":"https://api.github.com/repos/accord-net/framework/issues/259","id":260282233,"user":{"login":"jbrant","id":7298338,"avatar_url":"https://avatars.githubusercontent.com/u/7298338?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrant","html_url":"https://github.com/jbrant","followers_url":"https://api.github.com/users/jbrant/followers","following_url":"https://api.github.com/users/jbrant/following{/other_user}","gists_url":"https://api.github.com/users/jbrant/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrant/subscriptions","organizations_url":"https://api.github.com/users/jbrant/orgs","repos_url":"https://api.github.com/users/jbrant/repos","events_url":"https://api.github.com/users/jbrant/events{/privacy}","received_events_url":"https://api.github.com/users/jbrant/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T09:03:10Z","updated_at":"2016-11-14T09:03:10Z","body":"Hi Khan, thank you very much for your reply.  Reducing the dimensions did work; however, in my particular situation, I'm unfortunately unable to incur that loss in fidelity.  That being said, I switched to uniform seeding (as opposed to the default kmeans++) and didn't have any issues, even at rather high dimensionality.\r\n\r\nThanks again,\r\nJonathan"}}
{"actor":{"display_login":"jbrant"}}