The purpose of this issue is to collate and discuss user feedback.
Layout
Predictors all live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/src/predictors
Extensions live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/ext
Documentation
The docs can be difficult to build, because it requires a PyTorch installation via CONDA.
You might need to uncomment:
|
# julia> ENV["JULIA_CONDAPKG_BACKEND"] = "Current" |
Otherwise, you'll need to make do with reading the source until I can set up CI (we need the repo to be public first).
Here's a good tutorial intro:
https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/tutorials/mnist.jl
The predictors all have doctrings and examples
|
""" |
|
Affine( |
|
A::Matrix{Float64}, |
|
b::Vector{Float64} = zeros(size(A, 1)), |
|
) <: AbstractPredictor |
|
|
|
An [`AbstractPredictor`](@ref) that represents the affine relationship: |
|
```math |
|
f(x) = A x + b |
|
``` |
|
|
|
## Example |
|
|
|
```jldoctest |
|
julia> using JuMP, MathOptAI |
|
|
|
julia> model = Model(); |
|
|
|
julia> @variable(model, x[1:2]); |
|
|
|
julia> f = MathOptAI.Affine([2.0, 3.0]) |
|
Affine(A, b) [input: 2, output: 1] |
|
|
|
julia> y = MathOptAI.add_predictor(model, f, x) |
|
1-element Vector{VariableRef}: |
|
moai_Affine[1] |
|
|
|
julia> print(model) |
|
Feasibility |
|
Subject to |
|
2 x[1] + 3 x[2] - moai_Affine[1] = 0 |
|
|
|
julia> y = MathOptAI.add_predictor(model, MathOptAI.ReducedSpace(f), x) |
|
1-element Vector{AffExpr}: |
|
2 x[1] + 3 x[2] |
|
``` |
|
""" |
Return structs
Read #67 and #80. Thoughts, comments, and ideas?
Comparison to existing projects
Read https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/developers/design_principles.md. Have I misrepresented anything, or left anything out?
The purpose of this issue is to collate and discuss user feedback.
Layout
Predictors all live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/src/predictors
Extensions live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/ext
Documentation
The docs can be difficult to build, because it requires a PyTorch installation via CONDA.
You might need to uncomment:
MathOptAI.jl/docs/src/tutorials/pytorch.jl
Line 22 in e1e4f47
Otherwise, you'll need to make do with reading the source until I can set up CI (we need the repo to be public first).
Here's a good tutorial intro:
https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/tutorials/mnist.jl
The predictors all have doctrings and examples
MathOptAI.jl/src/predictors/Affine.jl
Lines 7 to 43 in e1e4f47
Return structs
Read #67 and #80. Thoughts, comments, and ideas?
Comparison to existing projects
Read https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/developers/design_principles.md. Have I misrepresented anything, or left anything out?