mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 00:18:51 -06:00
Reformat source code
This commit is contained in:
@@ -9,7 +9,13 @@ using SparseArrays
|
||||
using Statistics
|
||||
using TimerOutputs
|
||||
|
||||
function collect_gmi(mps_filename; optimizer, max_rounds=10, max_cuts_per_round=100, atol=1e-4)
|
||||
function collect_gmi(
|
||||
mps_filename;
|
||||
optimizer,
|
||||
max_rounds = 10,
|
||||
max_cuts_per_round = 100,
|
||||
atol = 1e-4,
|
||||
)
|
||||
@info mps_filename
|
||||
reset_timer!()
|
||||
|
||||
@@ -98,12 +104,12 @@ function collect_gmi(mps_filename; optimizer, max_rounds=10, max_cuts_per_round=
|
||||
sol_frac = get_x(model_s)
|
||||
stats_time_select += @elapsed begin
|
||||
selected_rows =
|
||||
select_gmi_rows(data_s, basis, sol_frac, max_rows=max_cuts_per_round)
|
||||
select_gmi_rows(data_s, basis, sol_frac, max_rows = max_cuts_per_round)
|
||||
end
|
||||
|
||||
# Compute selected tableau rows
|
||||
stats_time_tableau += @elapsed begin
|
||||
tableau = compute_tableau(data_s, basis, sol_frac, rows=selected_rows)
|
||||
tableau = compute_tableau(data_s, basis, sol_frac, rows = selected_rows)
|
||||
|
||||
# Assert tableau rows have been computed correctly
|
||||
assert_eq(tableau.lhs * sol_frac, tableau.rhs)
|
||||
@@ -180,10 +186,9 @@ function collect_gmi(mps_filename; optimizer, max_rounds=10, max_cuts_per_round=
|
||||
)
|
||||
end
|
||||
|
||||
function select_gmi_rows(data, basis, x; max_rows=10, atol=1e-4)
|
||||
function select_gmi_rows(data, basis, x; max_rows = 10, atol = 1e-4)
|
||||
candidate_rows = [
|
||||
r for
|
||||
r in 1:length(basis.var_basic) if (
|
||||
r for r = 1:length(basis.var_basic) if (
|
||||
(data.var_types[basis.var_basic[r]] != 'C') &&
|
||||
(frac(x[basis.var_basic[r]]) > atol) &&
|
||||
(frac2(x[basis.var_basic[r]]) > atol)
|
||||
@@ -204,7 +209,7 @@ function compute_gmi(data::ProblemData, tableau::Tableau)::ConstraintSet
|
||||
lhs_J = Int[]
|
||||
lhs_V = Float64[]
|
||||
@timeit "Compute coefficients" begin
|
||||
for k in 1:nnz(tableau.lhs)
|
||||
for k = 1:nnz(tableau.lhs)
|
||||
i::Int = tableau_I[k]
|
||||
j::Int = tableau_J[k]
|
||||
v::Float64 = 0.0
|
||||
@@ -235,4 +240,5 @@ function compute_gmi(data::ProblemData, tableau::Tableau)::ConstraintSet
|
||||
return ConstraintSet(; lhs, ub, lb)
|
||||
end
|
||||
|
||||
export compute_gmi, frac, select_gmi_rows, assert_cuts_off, assert_does_not_cut_off, collect_gmi
|
||||
export compute_gmi,
|
||||
frac, select_gmi_rows, assert_cuts_off, assert_does_not_cut_off, collect_gmi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@inline frac2(x::Float64) = ceil(x) - x
|
||||
|
||||
function assert_leq(a, b; atol=0.01)
|
||||
function assert_leq(a, b; atol = 0.01)
|
||||
if !all(a .<= b .+ atol)
|
||||
delta = a .- b
|
||||
for i in eachindex(delta)
|
||||
@@ -14,7 +14,7 @@ function assert_leq(a, b; atol=0.01)
|
||||
end
|
||||
end
|
||||
|
||||
function assert_eq(a, b; atol=1e-4)
|
||||
function assert_eq(a, b; atol = 1e-4)
|
||||
if !all(abs.(a .- b) .<= atol)
|
||||
delta = abs.(a .- b)
|
||||
for i in eachindex(delta)
|
||||
@@ -26,7 +26,7 @@ function assert_eq(a, b; atol=1e-4)
|
||||
end
|
||||
end
|
||||
|
||||
function assert_cuts_off(cuts::ConstraintSet, x::Vector{Float64}, tol=1e-6)
|
||||
function assert_cuts_off(cuts::ConstraintSet, x::Vector{Float64}, tol = 1e-6)
|
||||
for i = 1:length(cuts.lb)
|
||||
val = cuts.lhs[i, :]' * x
|
||||
if (val <= cuts.ub[i] - tol) && (val >= cuts.lb[i] + tol)
|
||||
@@ -35,7 +35,7 @@ function assert_cuts_off(cuts::ConstraintSet, x::Vector{Float64}, tol=1e-6)
|
||||
end
|
||||
end
|
||||
|
||||
function assert_does_not_cut_off(cuts::ConstraintSet, x::Vector{Float64}; tol=1e-6)
|
||||
function assert_does_not_cut_off(cuts::ConstraintSet, x::Vector{Float64}; tol = 1e-6)
|
||||
for i = 1:length(cuts.lb)
|
||||
val = cuts.lhs[i, :]' * x
|
||||
ub = cuts.ub[i]
|
||||
|
||||
@@ -53,8 +53,14 @@ function __init_components__()
|
||||
)
|
||||
copy!(SelectTopSolutions, pyimport("miplearn.components.primal.mem").SelectTopSolutions)
|
||||
copy!(MergeTopSolutions, pyimport("miplearn.components.primal.mem").MergeTopSolutions)
|
||||
copy!(MemorizingCutsComponent, pyimport("miplearn.components.cuts.mem").MemorizingCutsComponent)
|
||||
copy!(MemorizingLazyComponent, pyimport("miplearn.components.lazy.mem").MemorizingLazyComponent)
|
||||
copy!(
|
||||
MemorizingCutsComponent,
|
||||
pyimport("miplearn.components.cuts.mem").MemorizingCutsComponent,
|
||||
)
|
||||
copy!(
|
||||
MemorizingLazyComponent,
|
||||
pyimport("miplearn.components.lazy.mem").MemorizingLazyComponent,
|
||||
)
|
||||
end
|
||||
|
||||
export MinProbabilityClassifier,
|
||||
|
||||
@@ -39,14 +39,14 @@ end
|
||||
function PyObject(m::SparseMatrixCSC)
|
||||
pyimport("scipy.sparse").csc_matrix(
|
||||
(m.nzval, m.rowval .- 1, m.colptr .- 1),
|
||||
shape=size(m),
|
||||
shape = size(m),
|
||||
).tocoo()
|
||||
end
|
||||
|
||||
function write_jld2(
|
||||
objs::Vector,
|
||||
dirname::AbstractString;
|
||||
prefix::AbstractString=""
|
||||
prefix::AbstractString = "",
|
||||
)::Vector{String}
|
||||
mkpath(dirname)
|
||||
filenames = [@sprintf("%s/%s%05d.jld2", dirname, prefix, i) for i = 1:length(objs)]
|
||||
|
||||
@@ -13,7 +13,7 @@ function __init_problems_setcover__()
|
||||
copy!(SetCoverGenerator, pyimport("miplearn.problems.setcover").SetCoverGenerator)
|
||||
end
|
||||
|
||||
function build_setcover_model_jump(data::Any; optimizer=HiGHS.Optimizer)
|
||||
function build_setcover_model_jump(data::Any; optimizer = HiGHS.Optimizer)
|
||||
if data isa String
|
||||
data = read_pkl_gz(data)
|
||||
end
|
||||
|
||||
@@ -10,10 +10,13 @@ global MaxWeightStableSetGenerator = PyNULL()
|
||||
|
||||
function __init_problems_stab__()
|
||||
copy!(MaxWeightStableSetData, pyimport("miplearn.problems.stab").MaxWeightStableSetData)
|
||||
copy!(MaxWeightStableSetGenerator, pyimport("miplearn.problems.stab").MaxWeightStableSetGenerator)
|
||||
copy!(
|
||||
MaxWeightStableSetGenerator,
|
||||
pyimport("miplearn.problems.stab").MaxWeightStableSetGenerator,
|
||||
)
|
||||
end
|
||||
|
||||
function build_stab_model_jump(data::Any; optimizer=HiGHS.Optimizer)
|
||||
function build_stab_model_jump(data::Any; optimizer = HiGHS.Optimizer)
|
||||
nx = pyimport("networkx")
|
||||
|
||||
if data isa String
|
||||
@@ -50,11 +53,7 @@ function build_stab_model_jump(data::Any; optimizer=HiGHS.Optimizer)
|
||||
end
|
||||
end
|
||||
|
||||
return JumpModel(
|
||||
model,
|
||||
cuts_separate=cuts_separate,
|
||||
cuts_enforce=cuts_enforce,
|
||||
)
|
||||
return JumpModel(model, cuts_separate = cuts_separate, cuts_enforce = cuts_enforce)
|
||||
end
|
||||
|
||||
export MaxWeightStableSetData, MaxWeightStableSetGenerator, build_stab_model_jump
|
||||
|
||||
@@ -9,7 +9,10 @@ global TravelingSalesmanGenerator = PyNULL()
|
||||
|
||||
function __init_problems_tsp__()
|
||||
copy!(TravelingSalesmanData, pyimport("miplearn.problems.tsp").TravelingSalesmanData)
|
||||
copy!(TravelingSalesmanGenerator, pyimport("miplearn.problems.tsp").TravelingSalesmanGenerator)
|
||||
copy!(
|
||||
TravelingSalesmanGenerator,
|
||||
pyimport("miplearn.problems.tsp").TravelingSalesmanGenerator,
|
||||
)
|
||||
end
|
||||
|
||||
function build_tsp_model_jump(data::Any; optimizer)
|
||||
@@ -19,17 +22,15 @@ function build_tsp_model_jump(data::Any; optimizer)
|
||||
data = read_pkl_gz(data)
|
||||
end
|
||||
model = Model(optimizer)
|
||||
edges = [(i, j) for i in 1:data.n_cities for j in (i+1):data.n_cities]
|
||||
edges = [(i, j) for i = 1:data.n_cities for j = (i+1):data.n_cities]
|
||||
x = @variable(model, x[edges], Bin)
|
||||
@objective(model, Min, sum(
|
||||
x[(i, j)] * data.distances[i, j] for (i, j) in edges
|
||||
))
|
||||
@objective(model, Min, sum(x[(i, j)] * data.distances[i, j] for (i, j) in edges))
|
||||
|
||||
# Eq: Must choose two edges adjacent to each node
|
||||
@constraint(
|
||||
model,
|
||||
eq_degree[i in 1:data.n_cities],
|
||||
sum(x[(min(i, j), max(i, j))] for j in 1:data.n_cities if i != j) == 2
|
||||
sum(x[(min(i, j), max(i, j))] for j = 1:data.n_cities if i != j) == 2
|
||||
)
|
||||
|
||||
function lazy_separate(cb_data)
|
||||
@@ -41,10 +42,8 @@ function build_tsp_model_jump(data::Any; optimizer)
|
||||
for component in nx.connected_components(graph)
|
||||
if length(component) < data.n_cities
|
||||
cut_edges = [
|
||||
[e[1], e[2]]
|
||||
for e in edges
|
||||
if (e[1] ∈ component && e[2] ∉ component)
|
||||
||
|
||||
[e[1], e[2]] for
|
||||
e in edges if (e[1] ∈ component && e[2] ∉ component) ||
|
||||
(e[1] ∉ component && e[2] ∈ component)
|
||||
]
|
||||
push!(violations, cut_edges)
|
||||
@@ -63,9 +62,9 @@ function build_tsp_model_jump(data::Any; optimizer)
|
||||
|
||||
return JumpModel(
|
||||
model,
|
||||
lazy_enforce=lazy_enforce,
|
||||
lazy_separate=lazy_separate,
|
||||
lp_optimizer=optimizer,
|
||||
lazy_enforce = lazy_enforce,
|
||||
lazy_separate = lazy_separate,
|
||||
lp_optimizer = optimizer,
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Base.@kwdef mutable struct _JumpModelExtData
|
||||
cuts_separate::Union{Function,Nothing} = nothing
|
||||
lazy_enforce::Union{Function,Nothing} = nothing
|
||||
lazy_separate::Union{Function,Nothing} = nothing
|
||||
lp_optimizer
|
||||
lp_optimizer::Any
|
||||
end
|
||||
|
||||
function JuMP.copy_extension_data(
|
||||
@@ -26,9 +26,7 @@ function JuMP.copy_extension_data(
|
||||
new_model::AbstractModel,
|
||||
::AbstractModel,
|
||||
)
|
||||
new_model.ext[:miplearn] = _JumpModelExtData(
|
||||
lp_optimizer=old_ext.lp_optimizer
|
||||
)
|
||||
new_model.ext[:miplearn] = _JumpModelExtData(lp_optimizer = old_ext.lp_optimizer)
|
||||
end
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -297,7 +295,7 @@ end
|
||||
function _fix_variables(model::JuMP.Model, var_names, var_values, stats)
|
||||
vars = [variable_by_name(model, v) for v in var_names]
|
||||
for (i, var) in enumerate(vars)
|
||||
fix(var, var_values[i], force=true)
|
||||
fix(var, var_values[i], force = true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -392,19 +390,19 @@ function __init_solvers_jump__()
|
||||
function __init__(
|
||||
self,
|
||||
inner;
|
||||
cuts_enforce::Union{Function,Nothing}=nothing,
|
||||
cuts_separate::Union{Function,Nothing}=nothing,
|
||||
lazy_enforce::Union{Function,Nothing}=nothing,
|
||||
lazy_separate::Union{Function,Nothing}=nothing,
|
||||
lp_optimizer=HiGHS.Optimizer,
|
||||
cuts_enforce::Union{Function,Nothing} = nothing,
|
||||
cuts_separate::Union{Function,Nothing} = nothing,
|
||||
lazy_enforce::Union{Function,Nothing} = nothing,
|
||||
lazy_separate::Union{Function,Nothing} = nothing,
|
||||
lp_optimizer = HiGHS.Optimizer,
|
||||
)
|
||||
self.inner = inner
|
||||
self.inner.ext[:miplearn] = _JumpModelExtData(
|
||||
cuts_enforce=cuts_enforce,
|
||||
cuts_separate=cuts_separate,
|
||||
lazy_enforce=lazy_enforce,
|
||||
lazy_separate=lazy_separate,
|
||||
lp_optimizer=lp_optimizer,
|
||||
cuts_enforce = cuts_enforce,
|
||||
cuts_separate = cuts_separate,
|
||||
lazy_enforce = lazy_enforce,
|
||||
lazy_separate = lazy_separate,
|
||||
lp_optimizer = lp_optimizer,
|
||||
)
|
||||
end
|
||||
|
||||
@@ -414,7 +412,7 @@ function __init_solvers_jump__()
|
||||
constrs_lhs,
|
||||
constrs_sense,
|
||||
constrs_rhs,
|
||||
stats=nothing,
|
||||
stats = nothing,
|
||||
) = _add_constrs(
|
||||
self.inner,
|
||||
from_str_array(var_names),
|
||||
@@ -430,14 +428,14 @@ function __init_solvers_jump__()
|
||||
|
||||
extract_after_mip(self, h5) = _extract_after_mip(self.inner, h5)
|
||||
|
||||
fix_variables(self, var_names, var_values, stats=nothing) =
|
||||
fix_variables(self, var_names, var_values, stats = nothing) =
|
||||
_fix_variables(self.inner, from_str_array(var_names), var_values, stats)
|
||||
|
||||
optimize(self) = _optimize(self.inner)
|
||||
|
||||
relax(self) = Class(_relax(self.inner))
|
||||
|
||||
set_warm_starts(self, var_names, var_values, stats=nothing) =
|
||||
set_warm_starts(self, var_names, var_values, stats = nothing) =
|
||||
_set_warm_starts(self.inner, from_str_array(var_names), var_values, stats)
|
||||
|
||||
write(self, filename) = _write(self.inner, filename)
|
||||
|
||||
@@ -43,8 +43,8 @@ function runtests()
|
||||
end
|
||||
|
||||
function format()
|
||||
JuliaFormatter.format(BASEDIR, verbose=true)
|
||||
JuliaFormatter.format("$BASEDIR/../../src", verbose=true)
|
||||
JuliaFormatter.format(BASEDIR, verbose = true)
|
||||
JuliaFormatter.format("$BASEDIR/../../src", verbose = true)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -10,34 +10,32 @@ function gen_stab()
|
||||
randint = pyimport("scipy.stats").randint
|
||||
np.random.seed(42)
|
||||
gen = MaxWeightStableSetGenerator(
|
||||
w=uniform(10.0, scale=1.0),
|
||||
n=randint(low=50, high=51),
|
||||
p=uniform(loc=0.5, scale=0.0),
|
||||
fix_graph=true,
|
||||
w = uniform(10.0, scale = 1.0),
|
||||
n = randint(low = 50, high = 51),
|
||||
p = uniform(loc = 0.5, scale = 0.0),
|
||||
fix_graph = true,
|
||||
)
|
||||
data = gen.generate(1)
|
||||
data_filenames = write_pkl_gz(data, "$BASEDIR/../fixtures", prefix="stab-n50-")
|
||||
data_filenames = write_pkl_gz(data, "$BASEDIR/../fixtures", prefix = "stab-n50-")
|
||||
collector = BasicCollector()
|
||||
collector.collect(
|
||||
data_filenames,
|
||||
data -> build_stab_model_jump(data, optimizer=SCIP.Optimizer),
|
||||
progress=true,
|
||||
verbose=true,
|
||||
data -> build_stab_model_jump(data, optimizer = SCIP.Optimizer),
|
||||
progress = true,
|
||||
verbose = true,
|
||||
)
|
||||
end
|
||||
|
||||
function test_cuts()
|
||||
data_filenames = ["$BASEDIR/../fixtures/stab-n50-00000.pkl.gz"]
|
||||
clf = pyimport("sklearn.dummy").DummyClassifier()
|
||||
extractor = H5FieldsExtractor(
|
||||
instance_fields=["static_var_obj_coeffs"],
|
||||
)
|
||||
comp = MemorizingCutsComponent(clf=clf, extractor=extractor)
|
||||
solver = LearningSolver(components=[comp])
|
||||
extractor = H5FieldsExtractor(instance_fields = ["static_var_obj_coeffs"])
|
||||
comp = MemorizingCutsComponent(clf = clf, extractor = extractor)
|
||||
solver = LearningSolver(components = [comp])
|
||||
solver.fit(data_filenames)
|
||||
stats = solver.optimize(
|
||||
data_filenames[1],
|
||||
data -> build_stab_model_jump(data, optimizer=SCIP.Optimizer),
|
||||
data -> build_stab_model_jump(data, optimizer = SCIP.Optimizer),
|
||||
)
|
||||
@test stats["Cuts: AOT"] > 0
|
||||
end
|
||||
|
||||
@@ -11,36 +11,34 @@ function gen_tsp()
|
||||
np.random.seed(42)
|
||||
|
||||
gen = TravelingSalesmanGenerator(
|
||||
x=uniform(loc=0.0, scale=1000.0),
|
||||
y=uniform(loc=0.0, scale=1000.0),
|
||||
n=randint(low=20, high=21),
|
||||
gamma=uniform(loc=1.0, scale=0.25),
|
||||
fix_cities=true,
|
||||
round=true,
|
||||
x = uniform(loc = 0.0, scale = 1000.0),
|
||||
y = uniform(loc = 0.0, scale = 1000.0),
|
||||
n = randint(low = 20, high = 21),
|
||||
gamma = uniform(loc = 1.0, scale = 0.25),
|
||||
fix_cities = true,
|
||||
round = true,
|
||||
)
|
||||
data = gen.generate(1)
|
||||
data_filenames = write_pkl_gz(data, "$BASEDIR/../fixtures", prefix="tsp-n20-")
|
||||
data_filenames = write_pkl_gz(data, "$BASEDIR/../fixtures", prefix = "tsp-n20-")
|
||||
collector = BasicCollector()
|
||||
collector.collect(
|
||||
data_filenames,
|
||||
data -> build_tsp_model_jump(data, optimizer=GLPK.Optimizer),
|
||||
progress=true,
|
||||
verbose=true,
|
||||
data -> build_tsp_model_jump(data, optimizer = GLPK.Optimizer),
|
||||
progress = true,
|
||||
verbose = true,
|
||||
)
|
||||
end
|
||||
|
||||
function test_lazy()
|
||||
data_filenames = ["$BASEDIR/../fixtures/tsp-n20-00000.pkl.gz"]
|
||||
clf = pyimport("sklearn.dummy").DummyClassifier()
|
||||
extractor = H5FieldsExtractor(
|
||||
instance_fields=["static_var_obj_coeffs"],
|
||||
)
|
||||
comp = MemorizingLazyComponent(clf=clf, extractor=extractor)
|
||||
solver = LearningSolver(components=[comp])
|
||||
extractor = H5FieldsExtractor(instance_fields = ["static_var_obj_coeffs"])
|
||||
comp = MemorizingLazyComponent(clf = clf, extractor = extractor)
|
||||
solver = LearningSolver(components = [comp])
|
||||
solver.fit(data_filenames)
|
||||
stats = solver.optimize(
|
||||
data_filenames[1],
|
||||
data -> build_tsp_model_jump(data, optimizer=GLPK.Optimizer),
|
||||
data -> build_tsp_model_jump(data, optimizer = GLPK.Optimizer),
|
||||
)
|
||||
@test stats["Lazy Constraints: AOT"] > 0
|
||||
end
|
||||
|
||||
@@ -8,11 +8,11 @@ using SCIP
|
||||
function test_problems_stab()
|
||||
nx = pyimport("networkx")
|
||||
data = MaxWeightStableSetData(
|
||||
graph=nx.gnp_random_graph(25, 0.5, seed=42),
|
||||
weights=repeat([1.0], 25),
|
||||
graph = nx.gnp_random_graph(25, 0.5, seed = 42),
|
||||
weights = repeat([1.0], 25),
|
||||
)
|
||||
h5 = H5File(tempname(), "w")
|
||||
model = build_stab_model_jump(data, optimizer=SCIP.Optimizer)
|
||||
model = build_stab_model_jump(data, optimizer = SCIP.Optimizer)
|
||||
model.extract_after_load(h5)
|
||||
model.optimize()
|
||||
model.extract_after_mip(h5)
|
||||
|
||||
@@ -10,17 +10,12 @@ function test_problems_tsp()
|
||||
squareform = pyimport("scipy.spatial.distance").squareform
|
||||
|
||||
data = TravelingSalesmanData(
|
||||
n_cities=6,
|
||||
distances=squareform(pdist([
|
||||
[0.0, 0.0],
|
||||
[1.0, 0.0],
|
||||
[2.0, 0.0],
|
||||
[3.0, 0.0],
|
||||
[0.0, 1.0],
|
||||
[3.0, 1.0],
|
||||
])),
|
||||
n_cities = 6,
|
||||
distances = squareform(
|
||||
pdist([[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [0.0, 1.0], [3.0, 1.0]]),
|
||||
),
|
||||
)
|
||||
model = build_tsp_model_jump(data, optimizer=GLPK.Optimizer)
|
||||
model = build_tsp_model_jump(data, optimizer = GLPK.Optimizer)
|
||||
model.optimize()
|
||||
@test objective_value(model.inner) == 8.0
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@ function test_jld2()
|
||||
_TestStruct(2, [1.0, 2.0, 3.0]),
|
||||
_TestStruct(3, [3.0, 3.0, 3.0]),
|
||||
]
|
||||
filenames = write_jld2(data, dirname, prefix="obj")
|
||||
filenames = write_jld2(data, dirname, prefix = "obj")
|
||||
@test all(
|
||||
filenames .==
|
||||
["$dirname/obj00001.jld2", "$dirname/obj00002.jld2", "$dirname/obj00003.jld2"],
|
||||
|
||||
@@ -13,16 +13,16 @@ function test_usage()
|
||||
|
||||
@debug "Setting up LearningSolver..."
|
||||
solver = LearningSolver(
|
||||
components=[
|
||||
components = [
|
||||
IndependentVarsPrimalComponent(
|
||||
base_clf=SingleClassFix(
|
||||
base_clf = SingleClassFix(
|
||||
MinProbabilityClassifier(
|
||||
base_clf=LogisticRegression(),
|
||||
thresholds=[0.95, 0.95],
|
||||
base_clf = LogisticRegression(),
|
||||
thresholds = [0.95, 0.95],
|
||||
),
|
||||
),
|
||||
extractor=AlvLouWeh2017Extractor(),
|
||||
action=SetWarmStart(),
|
||||
extractor = AlvLouWeh2017Extractor(),
|
||||
action = SetWarmStart(),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user