A Julia implementation of the Meta-ICVI method as a separate package.
Documentation | Build Status | Coverage |
---|---|---|
You must install PyCallJLD.jl
alongside MetaICVI.jl
for correct classifier module loading and saving.
This is because the ScikitLearn.jl
dependency requires saving/loading with the JLD.jl
package on PyCall.jl
objects, and PyCallJLD correctly loads the serialized object definitions into the current workspace.
Otherwise, the classifier is loaded a memory block wrapped in a PyObject type, breaking inference and other operations.
PyCallJLD.jl
is distributed as a Julia package, available on JuliaHub.
Its installation follows the usual Julia package installation procedure, interactively:
] add PyCallJLD
or programmatically:
using Pkg
Pkg.add("PyCallJLD")
At the time of this writing, MetaICVI.jl
is not released on JuliaHub.
To install MetaICVI.jl
, you may add the package directly from GitHub:
] add https://github.com/AP6YC/MetaICVI.jl
or programmatically, also with the GitHub link:
using Pkg
Pkg.add("https://github.com/AP6YC/MetaICVI.jl")
First, load both PyCall
and MetaICVI
with
using PyCall, MetaICVI
Then, create a MetaICVI module with the default constructor
metaicvi = MetaICVIModule()
and retrieve the MetaICVI value iteratively with
get_metaicvi(metaicvi, sample, label)
where sample
is a real-valued vector and label
is an integer.
After loading both PyCall
and MetaICVI
using PyCall, MetaICVI
you can specify the MetaICVI options with
opts = MetaICVIOpts(
classifier_selection = :SGDClassifier,
classifier_opts = (loss="log", max_iter=30),
icvi_window = 5,
correlation_window = 5,
n_rocket = 5,
rocket_file = "data/models/rocket.jld2",
classifier_file = "data/models/classifier.jld",
display = true,
fail_on_missing = false
)
metaicvi = MetaICVIModule(opts)
The options are
classifier_selection
: a symbol for a linear classifier fromScikitLearn.jl
(only used if you are creating and training a new classifier).classifier_opts
: the options passed to the classifier during instantiation (also only used if creating and training a new classifier).icvi_window
: the number of ICVI criterion values to compute rank correlation across.correlation_window
: the number of correlations to compute rocket features across.rocket_file
: filename of a saved RocketModule.classifier_file
: filename of a saved linear classifier.display
: boolean flag for logging info.fail_on_missing
: boolean flag for crashing if missing rocket and/or classifier files.
Please raise an issue.
- Sasha Petrenko [email protected]
This software is developed by the Applied Computational Intelligence Laboratory (ACIL) of the Missouri University of Science and Technology (S&T) under the supervision of Teledyne Technologies for the DARPA L2M program. Read the License.