Repository: JuliaAI/MLJBase.jl (julia)

Issue:
Bind measure doc-string to all aliases
```julia
help?> log_loss
search: log_loss log_cosh_loss logit_dist_loss logit_margin_loss

  No documentation found.
```

But 

```julia
help?> LogLoss
search: LogLoss log_loss LogCoshLoss LogitDistLoss log_cosh_loss LogitMarginLoss

  MLJBase.LogLoss

  A measure type for log loss, which includes the instance(s): log_loss,
  cross_entropy.

  LogLoss()(ŷ, y)
  LogLoss()(ŷ, y, w)

  Evaluate the default instance of LogLoss on predictions ŷ, given ground
  truth observations y. Optionally specify per-sample weights, w.

  For details, see LogScore, which differs only by a sign.

  Requires scitype(y) to be a subtype of Union{AbstractArray{var"#s1148", N}
  where {var"#s1148"<:Union{Missing, ScientificTypesBase.Multiclass}, N},
  AbstractArray{var"#s1147", N} where {var"#s1147"<:Union{Missing,
  ScientificTypesBase.OrderedFactor}, N}, AbstractArray{var"#s1146", N} where
  {var"#s1146"<:Union{Missing, ScientificTypesBase.Continuous}, N},
  AbstractArray{var"#s1145", N} where {var"#s1145"<:Union{Missing,
  ScientificTypesBase.Count}, N}}; ŷ must be an array of probabilistic
  predictions.

  For more information, run info(LogLoss).
```

Pull request description:
Resolves #717 

cc @jbrea

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 01f8a0d9..403b9931 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,6 @@ jobs:
       fail-fast: false
       matrix:
         version:
-          - '1.3' 
           - '1.6' 
           - '1' # automatically expands to the latest stable 1.x release of Julia.
         os:
diff --git a/Project.toml b/Project.toml
index 25e273fd..52e58e96 100644
--- a/Project.toml
+++ b/Project.toml
@@ -45,7 +45,7 @@ ScientificTypes = "3"
 StatisticalTraits = "3"
 StatsBase = "0.32, 0.33"
 Tables = "0.2, 1.0"
-julia = "1.3"
+julia = "1.6"
 
 [extras]
 DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
diff --git a/src/MLJBase.jl b/src/MLJBase.jl
index 7673f30b..776870a9 100644
--- a/src/MLJBase.jl
+++ b/src/MLJBase.jl
@@ -419,6 +419,7 @@ include("data/datasets_synthetic.jl")
 
 include("measures/measures.jl")
 include("measures/measure_search.jl")
+include("measures/doc_strings.jl")
 
 include("composition/models/stacking.jl")
 
diff --git a/src/measures/doc_strings.jl b/src/measures/doc_strings.jl
new file mode 100644
index 00000000..03ed76df
--- /dev/null
+++ b/src/measures/doc_strings.jl
@@ -0,0 +1,12 @@
+# the following creates doc-strings for the aliases (`instances`) of each measure:
+
+for m in measures()
+    name = m.name
+    for instance in m.instances
+        alias = Symbol(instance)
+        quote
+            @doc "An instance of type [`$($name)`](@ref). "*
+                "Query the [`$($name)`](@ref) doc-string for details. " $alias
+        end |> eval
+    end
+end
diff --git a/src/measures/finite.jl b/src/measures/finite.jl
index 5b3d6aa7..9b5ba919 100644
--- a/src/measures/finite.jl
+++ b/src/measures/finite.jl
@@ -614,7 +614,7 @@ MMI.docstring(::Type{<:MulticlassPrecision}) =
   "`multiclass_recall`."
 instances(::Type{<:MulticlassPrecision}) =
     ["multiclass_positive_predictive_value", "multiclass_ppv",
-     "multiclass_positivepredictive_value", "multiclass_recall"]
+     "multiclass_positivepredictive_value"]
 
 const W_KEY_MISMATCH = "Encountered target with levels different from the " *
                        "keys of user-specified dictionary of class weights."
diff --git a/src/measures/measures.jl b/src/measures/measures.jl
index 06590989..4565e61f 100644
--- a/src/measures/measures.jl
+++ b/src/measures/measures.jl
@@ -223,6 +223,7 @@ function check_pools(ŷ, w::AbstractDict)
 end
 
 # # INCLUDE SPECIFIC MEASURES AND TOOLS
+
 include("meta_utilities.jl")
 include("roc.jl")
 include("confusion_matrix.jl")
@@ -231,6 +232,7 @@ include("finite.jl")
 include("probabilistic.jl")
 include("loss_functions_interface.jl")
 
+
 # # DEFAULT MEASURES
 
 default_measure(T, S) = nothing
@@ -248,7 +250,7 @@ end
 function default_measure(
     ::Type{<:Deterministic},
     ::Type{<:Vec{<:Union{Missing,Finite}}}
-) 
+)
     return misclassification_rate
 end
 
@@ -256,7 +258,7 @@ end
 function default_measure(
     ::Type{<:Probabilistic},
     ::Type{<:Vec{<:Union{Missing,Finite}}}
-) 
+)
     return log_loss
 end
 
@@ -264,7 +266,7 @@ end
 function default_measure(
     ::Type{<:Probabilistic},
     ::Type{<:Vec{<:Union{Missing,Continuous}}}
-) 
+)
     return log_loss
 end
 
@@ -272,21 +274,21 @@ end
 function default_measure(
     ::Type{<:Probabilistic},
     ::Type{<:Vec{<:Union{Missing, Count}}}
-) 
+)
     return log_loss
 end
 
 function default_measure(
     ::Type{<:MMI.ProbabilisticDetector},
     ::Type{<:Vec{<:Union{Missing,OrderedFactor{2}}}}
-) 
+)
     return area_under_curve
 end
 
 function default_measure(
     ::Type{<:MMI.DeterministicDetector},
     ::Type{<:Vec{<:Union{Missing,OrderedFactor{2}}}}
-) 
+)
     return balanced_accuracy
 end
 
@@ -296,3 +298,4 @@ default_measure(::M) where M <: Supervised = default_measure(M)
 
 default_measure(M::Type{<:Annotator}) = default_measure(M, target_scitype(M))
 default_measure(::M) where M <: Annotator = default_measure(M)
+


Test patch:
diff --git a/test/measures/doc_strings.jl b/test/measures/doc_strings.jl
new file mode 100644
index 00000000..1cbf96c4
--- /dev/null
+++ b/test/measures/doc_strings.jl
@@ -0,0 +1,9 @@
+using MLJBase
+
+docstring = (Base.Docs.doc)((Base.Docs.Binding)(Main, :multiclass_recall))
+
+@test string(docstring) == "An instance of type "*
+    "[`MulticlassTruePositiveRate`](@ref). Query the "*
+    "[`MulticlassTruePositiveRate`](@ref) doc-string for details. \n"
+
+true
diff --git a/test/runtests.jl b/test/runtests.jl
index d74b2351..b97e1a1f 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -74,6 +74,7 @@ end
 @conditional_testset "measures" begin
     @test include("measures/measures.jl")
     @test include("measures/measure_search.jl")
+    @test include("measures/doc_strings.jl")
 end
 
 @conditional_testset "resampling" begin