Minor fixes

This commit is contained in:
2024-02-01 13:13:10 -06:00
parent d69c4bbfa7
commit 4d5b7e971c
3 changed files with 10 additions and 8 deletions

View File

@@ -28,15 +28,13 @@ end
function test_cuts()
data_filenames = ["$BASEDIR/../fixtures/stab-n50-0000$i.pkl.gz" for i in 0:0]
clf = pyimport("sklearn.neighbors").KNeighborsClassifier(n_neighbors=1)
clf = pyimport("sklearn.dummy").DummyClassifier()
extractor = H5FieldsExtractor(
instance_fields=["static_var_obj_coeffs"],
)
comp = MemorizingCutsComponent(clf=clf, extractor=extractor)
solver = LearningSolver(components=[comp])
solver.fit(data_filenames)
@show comp.n_features_
@show comp.n_targets_
stats = solver.optimize(
data_filenames[1],
data -> build_stab_model_jump(data, optimizer=SCIP.Optimizer),

View File

@@ -6,11 +6,6 @@ using PyCall
using SCIP
function test_problems_stab()
test_problems_stab_1()
test_problems_stab_2()
end
function test_problems_stab_1()
nx = pyimport("networkx")
data = MaxWeightStableSetData(
graph=nx.gnp_random_graph(25, 0.5, seed=42),