예제 #1
0
    def test_OneHotEncoder(self):
        df = get_baseball_df()

        p = Pipeline([('e', OneHotEncoder(columns=['League']))])

        df = p.transform(df)

        info(df)
예제 #2
0
    def test_ScopedTransformer(self):
        df = get_baseball_df()

        p = Pipeline([('e',
                       ScopedTransformer(transformer=MinMaxScaler(),
                                         columns=['RS']))])

        df = p.fit_transform(df, [])

        info(df)
예제 #3
0
    def transform(self, X: pd.DataFrame):
        info(X)

        return X
예제 #4
0
from sklearn.linear_model import Lasso
from litkit.data import get_baseball_df
from litkit.inspect import info

m = Lasso()

df = get_baseball_df()

y = df['RS']
X = df[['RA', 'W', 'OBP', 'SLG']]

m.fit(X, y)

info(m)
예제 #5
0
    def test_info(self):
        df = get_baseball_df()

        info(df)

        info(df.values)