Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
authors = ["Anthony D. Blaom <anthony.blaom@gmail.com>"]
name = "LearnAPI"
uuid = "92ad9a40-7767-427a-9ee6-6e577f1266cb"
version = "2.0.0"
version = "2.0.1"

[compat]
Preferences = "1.5.0"
Expand Down
2 changes: 0 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ functionality, such as external performance estimates, hyperparameter optimizati
model composition, provided by ML/statistics toolboxes and other packages. LearnAPI.jl
includes a number of Julia [traits](@ref traits) for promising specific behavior.

LearnAPI.jl's has no package dependencies.


## Sample workflow

Expand Down
2 changes: 0 additions & 2 deletions docs/src/testing_an_implementation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Testing an Implementation

Testing is provided by the LearnTestAPI.jl package.

Testing is provided by the LearnTestAPI.jl package documented below.

## Quick start
Expand Down
2 changes: 0 additions & 2 deletions docs/src/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ In the examples column of the table below, `Continuous` is a name owned the pack
| [`LearnAPI.data_interface`](@ref)`(learner)` | Interface implemented by objects returned by [`obs`](@ref) | `Base.HasLength()` (supports `MLCore.getobs/numobs`) | `Base.SizeUnknown()` (supports `iterate`) |
| [`LearnAPI.fit_scitype`](@ref)`(learner)` | upper bound on `scitype(data)` ensuring `fit(learner, data)` works | `Union{}` | `Tuple{AbstractVector{Continuous}, Continuous}` |
| [`LearnAPI.target_observation_scitype`](@ref)`(learner)` | upper bound on the scitype of each observation of the targget | `Any` | `Continuous` |
| [`LearnAPI.is_static`](@ref)`(learner)` | `true` if `fit` consumes no data | `false` | `true` |

### Derived Traits

Expand Down Expand Up @@ -109,7 +108,6 @@ LearnAPI.data_interface
LearnAPI.iteration_parameter
LearnAPI.fit_scitype
LearnAPI.target_observation_scitype
LearnAPI.is_static
```

```@docs
Expand Down
26 changes: 0 additions & 26 deletions src/traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -389,32 +389,6 @@ tables, and tuples of these. See the doc-string for details.
"""
data_interface(::Any) = LearnAPI.RandomAccess()

"""
LearnAPI.is_static(learner)

Returns `true` if [`fit`](@ref) is called with no data arguments, as in
`fit(learner)`. That is, `learner` does not generalize to new data, and data is only
provided at the `predict` or `transform` step.

For example, some clustering algorithms are applied with this workflow, to assign labels
to the observations in `X`:

```julia
model = fit(learner) # no training data
labels = predict(model, X) # may mutate `model`!

# extract some byproducts of the clustering algorithm (e.g., outliers):
LearnAPI.extras(model)
```

# New implementations

This trait, falling back to `false`, may only be overloaded when `fit` has no data
arguments. See more at [`fit`](@ref).

"""
is_static(::Any) = false

"""
LearnAPI.iteration_parameter(learner)

Expand Down
1 change: 0 additions & 1 deletion test/traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ small = SmallLearner()
@test LearnAPI.data_interface(small) == LearnAPI.RandomAccess()
@test !(6 isa LearnAPI.fit_scitype(small))
@test 6 isa LearnAPI.target_observation_scitype(small)
@test !LearnAPI.is_static(small)

# DERIVED TRAITS

Expand Down
Loading