OutlierDetectionJL / OutlierDetectionNetworks.jl

Neural-Network Outlier Detection Algorithms for Julia
MIT License
7 stars 2 forks source link

Parameter in ESADDetector doc-string not a parameter #4

Closed ablaom closed 2 years ago

ablaom commented 2 years ago

"loss" is listed as a parameter, but is not field of ESADDetector:

help?> OutlierDetectionNetworks.ESADDetector
  ESADDetector(encoder = Chain(),
              decoder = Chain(),
              batchsize = 32,
              epochs = 1,
              shuffle = false,
              partial = true,
              opt = ADAM(),
              λ1 = 1,
              λ2 = 1,
              noise = identity)

  End-to-End semi-supervised anomaly detection algorithm similar to DeepSAD, but without
  the pretraining phase. The algorithm was published by Huang et al., see [1].

  Parameters
  ============

  loss::Function

  The loss function used to calculate the reconstruction error, see
  https://fluxml.ai/Flux.jl/stable/models/losses/
  (https://fluxml.ai/Flux.jl/stable/models/losses/) for examples.

  λ1::Real

  Weighting parameter of the norm loss, which minimizes the empirical variance and thus
  minimizes entropy.

  λ2::Real

  Weighting parameter of the assistent loss function to define the consistency between the
  two encoders.

  noise::Function (AbstractArray{T} -> AbstractArray{T})

  A function to be applied to a batch of input data to add noise, see [1] for an
  explanation.

  Examples
  ==========

  using OutlierDetection: ESADDetector, fit, score
  detector = ESADDetector()
  X = rand(10, 100)
  y = rand([-1,1], 100)
  model = fit(detector, X, y)
  train_scores, test_scores = score(detector, model, X)

  References
  ============

  [1] Huang, Chaoqin; Ye, Fei; Zhang, Ya; Wang, Yan-Feng; Tian, Qi (2020): ESAD:
  End-to-end Deep Semi-supervised Anomaly Detection.
using MLJ
julia> model = (@load ESADDetector)()
[ Info: For silent loading, specify `verbosity=0`. 
import OutlierDetectionNetworks ✔
ESADDetector(
    encoder = Chain(),
    decoder = Chain(),
    batchsize = 32,
    epochs = 1,
    shuffle = false,
    partial = true,
    opt = Flux.Optimise.ADAM(0.001, (0.9, 0.999), 1.0e-8, IdDict{Any, Any}()),
    λ1 = 1,
    λ2 = 1,
    noise = identity)
davnn commented 2 years ago

Fixed with https://github.com/OutlierDetectionJL/OutlierDetectionNetworks.jl/releases/tag/v0.1.2