Skip to content

Commit e458cd5

Browse files
committed
update
1 parent 8b73976 commit e458cd5

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

mlxtend/feature_selection/tests/test_sequential_feature_selector.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Author: Sebastian Raschka <sebastianraschka.com>
44
#
55
# License: BSD 3 clause
6-
from mlxtend.data import boston_housing_data
76
import numpy as np
87
import pandas as pd
98
from numpy import nan
@@ -20,6 +19,7 @@
2019
from sklearn.pipeline import Pipeline
2120

2221
from mlxtend.classifier import SoftmaxRegression
22+
from mlxtend.data import boston_housing_data
2323
from mlxtend.feature_selection import SequentialFeatureSelector as SFS
2424
from mlxtend.utils import assert_raises
2525

@@ -443,8 +443,7 @@ def test_regression():
443443

444444

445445
def test_regression_sffs():
446-
boston = load_boston()
447-
X, y = boston.data, boston.target
446+
X, y = boston_housing_data()
448447
lr = LinearRegression()
449448
sfs_r = SFS(
450449
lr,
@@ -460,8 +459,7 @@ def test_regression_sffs():
460459

461460

462461
def test_regression_sbfs():
463-
boston = load_boston()
464-
X, y = boston.data, boston.target
462+
X, y = boston_housing_data()
465463
lr = LinearRegression()
466464
sfs_r = SFS(
467465
lr,
@@ -477,8 +475,7 @@ def test_regression_sbfs():
477475

478476

479477
def test_regression_in_range():
480-
boston = load_boston()
481-
X, y = boston.data, boston.target
478+
X, y = boston_housing_data()
482479
lr = LinearRegression()
483480
sfs_r = SFS(
484481
lr,
@@ -722,9 +719,7 @@ def test_string_scoring_clf():
722719

723720

724721
def test_max_feature_subset_size_in_tuple_range():
725-
boston = load_boston()
726-
X, y = boston.data, boston.target
727-
722+
X, y = boston_housing_data()
728723
lr = LinearRegression()
729724

730725
sfs = SFS(
@@ -741,8 +736,7 @@ def test_max_feature_subset_size_in_tuple_range():
741736

742737

743738
def test_max_feature_subset_best():
744-
boston = load_boston()
745-
X, y = boston.data, boston.target
739+
X, y = boston_housing_data()
746740
lr = LinearRegression()
747741

748742
sfs = SFS(lr, k_features="best", forward=True, floating=False, cv=10)
@@ -752,8 +746,7 @@ def test_max_feature_subset_best():
752746

753747

754748
def test_max_feature_subset_parsimonious():
755-
boston = load_boston()
756-
X, y = boston.data, boston.target
749+
X, y = boston_housing_data()
757750
lr = LinearRegression()
758751

759752
sfs = SFS(lr, k_features="parsimonious", forward=True, floating=False, cv=10)

0 commit comments

Comments
 (0)