File tree Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 4141 python -m pip install --upgrade pip
4242 pip install tensorflow==${{ matrix.tf-version }}
4343 pip install git+https://github.com/DataCanvasIO/Hypernets
44- pip install -r requirements.txt "protobuf<4.0" "numpy==1.19.5" "featuretools= =0.27"
44+ pip install -r requirements.txt "protobuf<4.0" "numpy==1.19.5" "featuretools< =0.27"
4545 pip install pytest-cov==2.4.0 python-coveralls codacy-coverage
4646 pip list
4747 - name : Test with pytest
Original file line number Diff line number Diff line change 44
55"""
66import pandas as pd
7- from sklearn .datasets import load_boston
87
98from deeptables .models import deeptable
109from deeptables .tests .misc import r2_c
1110from deeptables .utils import consts
1211from hypernets .tabular import get_tool_box
12+ from hypernets .tabular .datasets .dsutils import load_boston
1313
1414
1515class Test_DeepTable_Regression :
1616
1717 @staticmethod
1818 def load_data ():
1919 print ("Loading datasets..." )
20-
21- boston_dataset = load_boston ()
22-
23- df_train = pd .DataFrame (boston_dataset .data )
24- df_train .columns = boston_dataset .feature_names
25- target = pd .Series (boston_dataset .target )
26-
20+ df = load_boston ()
21+ target = df .pop ("target" )
22+ df_train = df
23+ # target = pd.Series(boston_dataset.target)
2724 return df_train , target
2825
2926 def setup_class (self ):
Original file line number Diff line number Diff line change 99from hypernets .core .callbacks import SummaryCallback , FileStorageLoggingCallback
1010from hypernets .core .searcher import OptimizeDirection
1111from hypernets .searchers import RandomSearcher
12- from sklearn . datasets import load_boston
12+
1313from sklearn .model_selection import train_test_split
14+ from hypernets .tabular .datasets .dsutils import load_boston
1415
1516from .. import homedir
1617
@@ -19,11 +20,9 @@ class Test_HyperDT_Regression():
1920
2021 def test_boston (self ):
2122 print ("Loading datasets..." )
22- boston_dataset = load_boston ()
23-
24- df_train = pd .DataFrame (boston_dataset .data )
25- df_train .columns = boston_dataset .feature_names
26- self .y = pd .Series (boston_dataset .target )
23+ df = load_boston ()
24+ df_train = df
25+ self .y = df .pop ('target' )
2726 self .X = df_train
2827
2928 self .X_train , \
You can’t perform that action at this time.
0 commit comments