Skip to content

Commit

Permalink
Up README with quickstart, add tests, bump
Browse files Browse the repository at this point in the history
  • Loading branch information
AP6YC committed Sep 30, 2021
1 parent 4ec94ef commit ad89df9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "AdaptiveResonance"
uuid = "3d72adc0-63d3-4141-bf9b-84450dd0395b"
authors = ["Sasha Petrenko"]
description = "A Julia package for Adaptive Resonance Theory (ART) algorithms."
version = "0.3.5"
version = "0.3.6"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Please read the [documentation](https://ap6yc.github.io/AdaptiveResonance.jl/dev
- [Contents](#contents)
- [Overview](#overview)
- [Installation](#installation)
- [Quickstart](#quickstart)
- [Implemented Modules](#implemented-modules)
- [Structure](#structure)
- [Contributing](#contributing)
Expand All @@ -73,7 +74,8 @@ Adaptive Resonance Theory (ART) is a neurocognitive theory of how recurrent cell
As a theory, it provides coherent and consistent explanations of how real neural networks learn patterns through competition, and it predicts the phenomena of attention and expectation as central to learning.
In engineering, the theory has been applied to a myriad of algorithmic models for unsupervised machine learning, though it has been extended to supervised and reinforcement learning frameworks.
This package provides implementations of many of these algorithms in Julia for both scientific research and engineering applications.
A quickstart is provided in [Installation](#installation), while detailed usage and examples are provided in the [documentation](https://ap6yc.github.io/AdaptiveResonance.jl/dev/).
Basic installation is outlined in [Installation](#installation), while a quickstart is provided in [Quickstart](#quickstart).
Detailed usage and examples are provided in the [documentation](https://ap6yc.github.io/AdaptiveResonance.jl/dev/).

## Installation

Expand All @@ -97,6 +99,34 @@ You may also add the package directly from GitHub to get the latest changes betw
] add https://github.com/AP6YC/AdaptiveResonance.jl
```

## Quickstart

Load the module with

```julia
using AdaptiveResonance
```

The stateful information of ART modules are structs with default constructures such as

```julia
art = DDVFA()
```

You can pass module-specific options during construction with keyword arguments such as

```julia
art = DDVFA(rho_ub=0.75, rho_lb=0.4)
```

For more advanced users, options for the modules are contained in `Parameters.jl` structs.
These options can be passed keyword arguments before instantiating the model:

```julia
opts = opts_DDVFA(rho_ub=0.75, rho_lb=0.4)
art = DDVFA(opts)
```

## Implemented Modules

This project has implementations of the following ART (unsupervised) and ARTMAP (supervised) modules:
Expand Down
17 changes: 17 additions & 0 deletions test/test_sets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ end # @testset "AdaptiveResonance.jl"
@info "--------- END TRAIN TEST ---------"
end

@testset "kwargs" begin
@info "--------- KWARGS TEST ---------"

arts = [
DVFA,
DDVFA,
SFAM,
DAM
]

for art in arts
art_module = art(alpha=1e-3, display=false)
end

@info "--------- END KWARGS TEST ---------"
end

@testset "DVFA.jl" begin
@info "------- DVFA Unsupervised -------"

Expand Down
5 changes: 4 additions & 1 deletion test/test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ function train_test_art(art::ARTModule, data::DataSplit; supervised::Bool=false,
error("Incompatible ART module passed for testing")
end

@info "$(typeof(art)): performance is $perf"
# If the performance is not a NaN (potentially unsupervsied), then display perf
if !isnan(perf)
@info "$(typeof(art)): performance is $perf"
end

return perf
end
Expand Down

2 comments on commit ad89df9

@AP6YC
Copy link
Owner Author

@AP6YC AP6YC commented on ad89df9 Sep 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

All ART modules can now be instantiated with keyword arguments for their hyperparameters and options in addition to the original default constructor and directly passing the parameters struct.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45839

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.6 -m "<description of version>" ad89df9f03819f408f2023a0a86c8d17b464c865
git push origin v0.3.6

Please sign in to comment.