Skip to content

(R) Make 'predict' an S3 method#1657

Closed
david-cortes wants to merge 7 commits into
catboost:masterfrom
david-cortes:predict_as_s3
Closed

(R) Make 'predict' an S3 method#1657
david-cortes wants to merge 7 commits into
catboost:masterfrom
david-cortes:predict_as_s3

Conversation

@david-cortes
Copy link
Copy Markdown
Contributor

@david-cortes david-cortes commented Apr 18, 2021

In the R interface, predictions from a model are obtained through function catboost.predict. In most other packages in R, the prediction function is a class method for the model object, so that it can be called with the generic predict - i.e.:

predict(model, data)

vs.

catboost.predict(model, data)

This PR turns it into a class method, keeping the old catboost.predict as a synonym.

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@kizill
Copy link
Copy Markdown
Member

kizill commented May 13, 2021

@arcadia-devtools Ship it!

@kizill
Copy link
Copy Markdown
Member

kizill commented May 13, 2021

Thank you a lot for this wonderful and really useful changes! 👍

@arcadia-devtools
Copy link
Copy Markdown
Collaborator

CLA already signed

@arcadia-devtools
Copy link
Copy Markdown
Collaborator

@kizill, internal review request created: 1776890

@kizill
Copy link
Copy Markdown
Member

kizill commented Sep 29, 2021

@arcadia-devtools Ship it!

Missing export
@kizill
Copy link
Copy Markdown
Member

kizill commented Oct 1, 2021

@arcadia-devtools Ship it!

@arcadia-devtools
Copy link
Copy Markdown
Collaborator

@kizill, internal review request updated: 1776890

@robot-magpie
Copy link
Copy Markdown

robot-magpie Bot commented Sep 21, 2025

@andrey-khropov has imported your pull request. If you are a Yandex employee, you can view this diff.

@robot-magpie
Copy link
Copy Markdown

robot-magpie Bot commented Sep 21, 2025

✅ This pull request is being closed because it has been successfully merged into our internal monorepository.
Your changes will be pushed to this repository soon. Thank you for your contribution!

@robot-magpie robot-magpie Bot closed this Sep 21, 2025
robot-piglet pushed a commit that referenced this pull request Sep 21, 2025
In the R interface, predictions from a model are obtained through function `catboost.predict`. In most other packages in R, the prediction function is a class method for the model object, so that it can be called with the generic `predict` - i.e.:
```r
predict(model, data)
```
vs.
```r
catboost.predict(model, data)
```

This PR turns it into a class method, keeping the old `catboost.predict` as a synonym.

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

---

Pull Request resolved: #1657

Co-authored-by: Stanislav Kirillov <[email protected]>
Co-authored-by: david-cortes <[email protected]>
Co-authored-by: andrey-khropov <[email protected]>
commit_hash:bbdbf8578d5619d6f4653092233a71e78e8204e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants