cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.54k stars 1.64k forks source link

Typo Error in Matlab's README #126

Closed caitaozhan closed 5 years ago

caitaozhan commented 5 years ago

Typo error location: libsvm/matlab/README, line 218

matlab> [predict_label_P, accuracy_P, dec_values_P] = svmpredict(test_label, [(1:120)', test_data* train_data'], model_precomputed);

The train_data should be test_data?

cjlin1 commented 5 years ago

train_data is correct because you need to calculate the kernel value between test instance and support vectors. Note that this is for the precomputed kernel setting.

On 2018-10-29 09:34, Caitao Zhan wrote:

Typo error location: libsvm/matlab/README, line 218

matlab> [predict_label_P, accuracy_P, dec_values_P] = svmpredict(test_label, [(1:120)', test_data* TRAIN_DATA'], model_precomputed);

The TRAIN_DATA should be TEST_DATA.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2]. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/cjlin1/libsvm/issues/126", "url": "https://github.com/cjlin1/libsvm/issues/126", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Typo Error in Matlab's README (#126)", "sections": [ { "text": "", "activityTitle": "Caitao Zhan", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@caitaozhan", "facts": [ { "name": "Repository: ", "value": "cjlin1/libsvm" }, { "name": "Issue #: ", "value": 126 } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"cjlin1/libsvm\",\n\"issueId\": 126,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"cjlin1/libsvm\",\n\"issueId\": 126\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/cjlin1/libsvm/issues/126" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 402211571\n}" } ], "themeColor": "26292E" } ]

Links:

[1] https://github.com/cjlin1/libsvm/issues/126 [2] https://github.com/notifications/unsubscribe-auth/AFGwnlVGL8sOkgc1XqDm8u_9C60hJxoKks5uplsNgaJpZM4X-ULz

caitaozhan commented 5 years ago

Got it. It seemed weird to me at first. Now I understand. Sorry, I should have thought more before opening this issue. Thanks!