From bf92582002cc6a2655d9ade87c9a8a8d4b80e75c Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Thu, 2 May 2024 14:26:35 +0200 Subject: [PATCH] fix default_features --- src/feature_classes.jl | 1 + test/runtests.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/src/feature_classes.jl b/src/feature_classes.jl index e639b94..7bf43b6 100644 --- a/src/feature_classes.jl +++ b/src/feature_classes.jl @@ -48,4 +48,5 @@ function default_features(np) if np >= 80 append!(features, [ProductFeature()]) end + return features end diff --git a/test/runtests.jl b/test/runtests.jl index 5bca7f1..0a8a4f1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,6 +14,7 @@ env1 = map(e -> [e[1]], env) # just the first row @test Maxnet.features_from_string("lqpt") == [LinearFeature(), CategoricalFeature(), QuadraticFeature(), ProductFeature(), ThresholdFeature()] @test Maxnet.default_features(100) == [LinearFeature(), CategoricalFeature(), QuadraticFeature(), HingeFeature(), ProductFeature()] + @test Maxnet.default_features(1) == [LinearFeature(), CategoricalFeature()] @test Maxnet.hinge(1:5, 3) == [ # 1:5 3:5 1:3 1:5