Skip to content

Commit

Permalink
Add objective base classes to API reference (#736)
Browse files Browse the repository at this point in the history
* init

* changelog

* add base template test

* update problem type docstr

* add in property as class docstr for now
  • Loading branch information
angela97lin committed May 1, 2020
1 parent 61e5a4c commit 185c540
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
15 changes: 15 additions & 0 deletions docs/source/api_reference.rst
Expand Up @@ -217,6 +217,21 @@ Regressors are models which can be trained to predict a target value from input
Objective Functions
====================

Objective Base Classes
~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated
:template: class.rst
:nosignatures:

ObjectiveBase
BinaryClassificationObjective
MulticlassClassificationObjective
RegressionObjective



Domain-Specific Objectives
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions docs/source/changelog.rst
Expand Up @@ -11,6 +11,7 @@ Changelog
* Documentation Changes
* Add instructions to freeze `master` on `release.md` :pr:`726`
* Update release instructions with more details :pr:`727` :pr:`733`
* Add objective base classes to API reference :pr:`736`
* Testing Changes
* Delete codecov yml, use codecov.io's default :pr:`732`

Expand Down
6 changes: 3 additions & 3 deletions evalml/objectives/binary_classification_objective.py
Expand Up @@ -7,12 +7,12 @@


class BinaryClassificationObjective(ObjectiveBase):
"""
Base class for all binary classification objectives.
"""Base class for all binary classification objectives.
problem_type (ProblemTypes): Specifies the type of problem this objective is defined for (binary classification)
problem_type (ProblemTypes): Type of problem this objective is. Set to ProblemTypes.BINARY.
can_optimize_threshold (bool): Determines if threshold used by objective can be optimized or not.
"""

problem_type = ProblemTypes.BINARY

@property
Expand Down
6 changes: 3 additions & 3 deletions evalml/objectives/multiclass_classification_objective.py
Expand Up @@ -4,9 +4,9 @@


class MulticlassClassificationObjective(ObjectiveBase):
"""
Base class for all multiclass classification objectives.
"""Base class for all multiclass classification objectives.
problem_type (ProblemTypes): Specifies the type of problem this objective is defined for (multiclass classification).
problem_type (ProblemTypes): Type of problem this objective is. Set to ProblemTypes.MULTICLASS.
"""

problem_type = ProblemTypes.MULTICLASS
6 changes: 3 additions & 3 deletions evalml/objectives/regression_objective.py
Expand Up @@ -4,10 +4,10 @@


class RegressionObjective(ObjectiveBase):
"""
Base class for all regression objectives.
"""Base class for all regression objectives.
problem_type (ProblemTypes): type of problem this objective is. Set to ProblemTypes.REGRESSION.
problem_type (ProblemTypes): Type of problem this objective is. Set to ProblemTypes.REGRESSION.
"""

problem_type = ProblemTypes.REGRESSION
score_needs_proba = False

0 comments on commit 185c540

Please sign in to comment.