Releases: JuliaAI/MLJBase.jl
v0.17.2
v0.17.1
v0.17.0
MLJBase v0.17.0
Some code re-organization:
- Import all model and measure traits from new base package StatisticalTraits.jl, which are programatically re-exported. This resolves #495
- Import some utilities from StatisticalTraits.jl, previously defined locally
- (breaking for users)
measures(matching(...))
facility removed; privateinfo_dic
method andmatching
method moved to MLJModels
Also added optimisations for models buying into a new data front-end #501 . This may increase the default memory footprint of MLJBase operations. To obtain old behaviour, specify cache=false
when constructing machines, as in machine(model, X, y, cache=false).
Closed issues:
- Add multi class precision/recall (#383)
- Decouple model traits from measure traits? (#495)
- Inappropriate error message thrown for calling transform on Static machines (#499)
- Problem loading LightGBM models (#505)
Merged pull requests:
v0.16.3
MLJBase v0.16.3
Closed issues:
Merged pull requests:
- Move from Travis CI to GitHub Actions CI (#465) (@DilumAluthge)
- Fix indentation in ci.yml ?? (#472) (@ablaom)
- revert ci (#474) (@ablaom)
- Fix the "Documentation" conditional, and fix CI, and delete the
REQUIRE
file (#476) (@DilumAluthge) - Doc update (#479) (@ablaom)
- doc tweak (#480) (@ablaom)
- Switch ci to gh action (incl documenter runs) (#481) (@ablaom)
- Fix the docs deployment (#483) (@DilumAluthge)
- Only build docs on PRs from dev to master, pushes to master, and pushes to tags (#485) (@DilumAluthge)
- Trivial commit (#488) (@ablaom)
- test doc ci (#489) (@ablaom)
- try julia 1 in doc project; set push_preview=true (#490) (@ablaom)
- Docs: set
push_preview=false
(#491) (@DilumAluthge) - @DilumAluthge Docs: set
push_preview=false
(#493) (@ablaom) - update build badge (#494) (@ablaom)
- Address MACHINE_CHANNEL issue (#497) (@ablaom)
- For a 0.16.3 release (#498) (@ablaom)
v0.16.2
MLJBase v0.16.2
Merged pull requests:
v0.16.1
v0.16.0
MLJBase v0.16.0
Compatiblity upgrades
Extend compatibility to include CategoricalArrays 0.9 and require MLJScientificTypes 0.4.1, with the following behaviour changes:
- (breaking)
coerce(v, OrderedFactor)
andcoerce(v, OrderedFactor)
will first convert non-missing elements of an arrayv
into strings unless the eltype ofv
is a subtype ofUnion{AbstractString, Char, Number, Missing}
; for example, ifv = [:x, :y]
andvnew = coerce(v, Multiclass)
, thenvnew[1] == "x"
istrue
butvnew[1] == :x
isfalse
. Otherwise the behaviour is unaltered.
Clean-up of measures
Resolve #450:
-
(enhancement) Thorough review of measure doc-strings, including addition of automatic doc-string generation to simplify new contributions (
@create_docs
macro) -
Add a new trait for measures called
human_name
(mainly for use in documentation); for example its value forL1EpsilonInsLoss
isl1 ϵ-insensitive loss
. There is a fallback that guesses a human name from the type name. -
(breaking) Redefine
name
trait on all measures to return string version of type name, eg, forL1EpsilonInsLoss
type (or its instances) the value is "L1EpsilonLoss". This is for consistency withname
on models. Type names have changed to make them maximally descriptive (eg,RMS
is nowRootMeanSquaredError
) but the old names are kept as aliases. -
(enhancement) Add a new trait for measures called
instances
(distinct fromBase.instances
and not exported) which lists string versions of built in instances, mostly aliases for the default instance. For example, the value onRecall
is["true_positive_rate", "truepositive_rate", "tpr", "sensitivity", "recall", "hit_rate"]
. These instances appear second on calls tomeasures()
so user to can easily lookup a short method to call in common use cases (see PR #459) -
(enhancement) Ensure every measure has a default keyword constructor, so, for example
FScore()
now works. -
(breaking)
FScore
areBrierScore
have been simplified to avoid unnecessary type parameters; this may break some constructors, likeFScore{1.0}()
. You should never need to use{}
to construct a measure instance. -
(enhancement) All types from LossFunctions.jl are exported and they now have default key-word constructors, just like the built-in measures, and their instances can be called the same way too. (In LossFunctions.jl the instances are not callable.)
-
Add
BierLoss
. It is just negative ofBrierScore
. -
(breaking) Dissallow keyword arguments in calls to
confmat
, which is now an instance of a measure type (confmat = ConfusionMatrix()
), rather than a function hacked to look like a measure. So, instead ofconfmat(yhat, y, perm=[2, 3, 1])
useConfusionMatrix(perm=[2, 3, 1])(yhat, y)
. What used to be calledConfusionMatrix
is nowConfusionMatrixObject
. The ordinary user will never need to construct one directly. -
(mildlly breaking) The field name
eps
inLogLoss=CrossEntropy
(for clamping) is renamed totol
for consistency with other measures and elsewhere in julia. HoweverCrossEntropy(eps=...)
still works.
Closed issues:
- name, aliases cleanup for measures (#450)
- specifying rev=false in confmat giving unexpected behaviour in multiclass case (#458)
Merged pull requests:
v0.15.7
MLJBase v0.15.7
Add the multiclass classification measures (applying to any Finite
target):
-
MulticlassFalseNegative
,MulticlassFalsePositive
,MulticlassTrueNegative
,MulticlassTruePositive
. When instances are called, as inMulticlassFalseNegative()(yhat, y)
, then they return a dictionary keyed on class, or a vector , according to the keyword argumentreturn_type=...
provided the constructor; options:LittleDict
(default),Vector
(#456 @ven-k) -
MulticlassFalseDiscoveryRate
,MulticlassFalseNegativeRate
,MulticlassNegativePredictiveValue
,MulticlassPrecision
,MulticlassTrueNegativeRate
,MulticlassTruePositiveRate
. Averaging method specified by keywordaverage=...
, with optionsmicro_avg
,macro_avg
andno_avg
. A float is returned unlessaverage=no_avg
, in which case the keyword argumentreturn_type
determines the return type, as above. Instances can be provided a dictionary of class weights,class_w
, as inMulticlassPrecision()(yhat, y, class_w)
(#456 @ven-k) -
MulticlassFScore
, with averaging and return type options specified as above. Instances can be similarly called with class weights (#456 @ven-k)
The averaging options closely mimic those implemented in scikit-learn, except that the binary versions have a separate implementation in MLJ (TruePositiveRate
, FScore
, etc). Note that the multiclass versions are "symmetrized" versions of the binary ones - so they apply to any Finite
target, while the original binary measures apply only to OrderedFactor{2}
. In particular, FScore()
(for example) on OrderedFactor{2}
is different from MulticlassFScore()
on OrderedFactor{2}
.
Closed issues:
- Add multiclass F1/Fb score (#382)
Merged pull requests:
v0.15.6
MLJBase v0.15.6
Merged pull requests:
v0.15.5
MLJBase v0.15.5
Closed issues:
- Stack traces are being clipped when there's an error in fit! (#442)
Merged pull requests: