Skip to content

Prevent crash when attempting to create training data without responses.#9054

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
zhmu:upstream
Jul 3, 2017
Merged

Prevent crash when attempting to create training data without responses.#9054
opencv-pushbot merged 1 commit intoopencv:masterfrom
zhmu:upstream

Conversation

@zhmu
Copy link
Copy Markdown
Contributor

@zhmu zhmu commented Jun 30, 2017

This is at least useful when using an SVM one-class linear classifier, so there are valid use cases.

resolves #8927

This pullrequest changes

This prevents the crash and is a no-op if responses are provided. I've performed some quick tests and I did not notice any different behaviour between this change or supplying zero response values.

However, I am absolutely no expert in this area - careful review would be most welcome.

This is at least useful when using an SVM one-class linear classifier, so there are valid use cases.
@sovrasov
Copy link
Copy Markdown
Contributor

sovrasov commented Jul 3, 2017

👍

@mshabunin
Copy link
Copy Markdown
Contributor

👍

@opencv-pushbot opencv-pushbot merged commit 3ce1bca into opencv:master Jul 3, 2017
opencv-pushbot pushed a commit that referenced this pull request Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cv::ml::TrainData cannot be instantiated without responses

5 participants