{"action":"created","issue":{"url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/1","labels_url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/1/comments","events_url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/1/events","html_url":"https://github.com/vrvis/aardvark.semantictextonforests/issues/1","id":111037365,"number":1,"title":"Hello i need some help with example","user":{"login":"MonsterMMORPG","id":4149474,"avatar_url":"https://avatars.githubusercontent.com/u/4149474?v=3","gravatar_id":"","url":"https://api.github.com/users/MonsterMMORPG","html_url":"https://github.com/MonsterMMORPG","followers_url":"https://api.github.com/users/MonsterMMORPG/followers","following_url":"https://api.github.com/users/MonsterMMORPG/following{/other_user}","gists_url":"https://api.github.com/users/MonsterMMORPG/gists{/gist_id}","starred_url":"https://api.github.com/users/MonsterMMORPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonsterMMORPG/subscriptions","organizations_url":"https://api.github.com/users/MonsterMMORPG/orgs","repos_url":"https://api.github.com/users/MonsterMMORPG/repos","events_url":"https://api.github.com/users/MonsterMMORPG/events{/privacy}","received_events_url":"https://api.github.com/users/MonsterMMORPG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-12T19:16:26Z","updated_at":"2015-10-14T09:27:23Z","closed_at":null,"body":"Hello your documentation i couldn't make it work.\r\n\r\n\r\n\r\nwhat i need are\r\n\r\nhow to train\r\nhow to Use cross-validation to find the best parameter C and γ\r\nhow to classify and get output etc\r\n\r\nHere how i make with libsvmsharp can you write same example for your software?\r\n\r\n\r\n            // Load the datasets: In this example I use the same datasets for training and testing which is not suggested\r\n            SVMProblem trainingSet = SVMProblemHelper.Load(@\"train.txt\");\r\n            SVMProblem testSet = SVMProblemHelper.Load(@\"test.txt\");\r\n\r\n            // Normalize the datasets if you want: L2 Norm => x / ||x||\r\n            trainingSet = trainingSet.Normalize(SVMNormType.L2);\r\n            testSet = testSet.Normalize(SVMNormType.L2);\r\n\r\n            // Select the parameter set\r\n            SVMParameter parameter = new SVMParameter();\r\n            parameter.Type = SVMType.C_SVC;\r\n            parameter.Kernel = SVMKernelType.RBF;\r\n            parameter.C = 1;\r\n            parameter.Gamma = 1;\r\n\r\n            // Do cross validation to check this parameter set is correct for the dataset or not\r\n            double[] crossValidationResults; // output labels\r\n            int nFold = 5;\r\n            trainingSet.CrossValidation(parameter, nFold, out crossValidationResults);\r\n\r\n            // Evaluate the cross validation result\r\n            // If it is not good enough, select the parameter set again\r\n            double crossValidationAccuracy = trainingSet.EvaluateClassificationProblem(crossValidationResults);\r\n\r\n            // Train the model, If your parameter set gives good result on cross validation\r\n            SVMModel model = trainingSet.Train(parameter);\r\n\r\n            // Save the model\r\n            SVM.SaveModel(model, @\"model.txt\");\r\n\r\n            // Predict the instances in the test set\r\n            double[] testResults = testSet.Predict(model);\r\n\r\n            // Evaluate the test results\r\n            int[,] confusionMatrix;\r\n            double testAccuracy = testSet.EvaluateClassificationProblem(testResults, model.Labels, out confusionMatrix);\r\n\r\n            // Print the resutls\r\n            Debug.WriteLine(\"\\n\\nCross validation accuracy: \" + crossValidationAccuracy);\r\n            Debug.WriteLine(\"\\nTest accuracy: \" + testAccuracy);\r\n            Debug.WriteLine(\"\\nConfusion matrix:\\n\");\r\n\r\n            // Print formatted confusion matrix\r\n            Debug.Write(String.Format(\"{0,6}\", \"\"));\r\n            for (int i = 0; i < model.Labels.Length; i++)\r\n                Debug.Write(String.Format(\"{0,5}\", \"(\" + model.Labels[i] + \")\"));\r\n            Debug.WriteLine(\"\");\r\n            for (int i = 0; i < confusionMatrix.GetLength(0); i++)\r\n            {\r\n                Debug.Write(String.Format(\"{0,5}\", \"(\" + model.Labels[i] + \")\"));\r\n                for (int j = 0; j < confusionMatrix.GetLength(1); j++)\r\n                    Debug.Write(String.Format(\"{0,5}\", confusionMatrix[i, j]));\r\n                Debug.WriteLine(\"\");\r\n            }\r\n\r\n            Debug.WriteLine(\"\\n\\nPress any key to quit...\");\r\n      \r\n"},"comment":{"url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/comments/147988562","html_url":"https://github.com/vrvis/aardvark.semantictextonforests/issues/1#issuecomment-147988562","issue_url":"https://api.github.com/repos/vrvis/aardvark.semantictextonforests/issues/1","id":147988562,"user":{"login":"aszabo314","id":12493227,"avatar_url":"https://avatars.githubusercontent.com/u/12493227?v=3","gravatar_id":"","url":"https://api.github.com/users/aszabo314","html_url":"https://github.com/aszabo314","followers_url":"https://api.github.com/users/aszabo314/followers","following_url":"https://api.github.com/users/aszabo314/following{/other_user}","gists_url":"https://api.github.com/users/aszabo314/gists{/gist_id}","starred_url":"https://api.github.com/users/aszabo314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszabo314/subscriptions","organizations_url":"https://api.github.com/users/aszabo314/orgs","repos_url":"https://api.github.com/users/aszabo314/repos","events_url":"https://api.github.com/users/aszabo314/events{/privacy}","received_events_url":"https://api.github.com/users/aszabo314/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T09:27:22Z","updated_at":"2015-10-14T09:27:22Z","body":"Documentation is given on the official website of libsvm (https://www.csie.ntu.edu.tw/~cjlin/libsvm/). Please see the examples there and my other reply."}}