Exemplo n.º 1
0
from ionyx.datasets import DataSetLoader
from ionyx import Visualizer

print('Beginning visualizer test...')

data, _, _ = DataSetLoader.load_property_inspection()
viz = Visualizer(data)
viz.feature_distributions()
viz.feature_correlations()
viz.variable_relationship(['T1_V1', 'T1_V2'], category_vars=None)
viz.variable_relationship(['T1_V1', 'T1_V2', 'T2_V1'], category_vars=None)
viz.variable_relationship(['T2_V1'], category_vars=['T1_V4'])
viz.variable_relationship(['T2_V1'], category_vars=['T1_V4', 'T1_V7'])
viz.variable_relationship(['T1_V1', 'T2_V1'], category_vars=['T1_V7'])

data, _, _, _ = DataSetLoader.load_bike_sharing()
viz = Visualizer(data)
viz.sequential_relationships()

data, _, _ = DataSetLoader.load_otto_group()
X_cols = data.columns[1:].tolist()
y_col = data.columns[0]
viz = Visualizer(data)
pca = PCA()
viz.transform(pca, X_columns=X_cols)
viz.transform(pca, X_columns=X_cols, y_column=y_col, task='classification')
viz.transform(pca, X_columns=X_cols, y_column=y_col, task='regression')

data, _, _ = DataSetLoader.load_otto_group()
data = data.iloc[:10000, :30]
X_cols = data.columns[1:].tolist()
Exemplo n.º 2
0
from ionyx.datasets import DataSetLoader

print('Beginning dataset loader test...')

data, X, y1, y2 = DataSetLoader.load_bike_sharing()
print("Bike-sharing data:")
print("Data shape = {0}, X shape = {1}, y1 shape = {2}, y2 shape = {3}".format(
    data.shape, X.shape, y1.shape, y2.shape))
print(data.head())
print("")

data, X, y = DataSetLoader.load_forest_cover()
print("Forest cover data:")
print("Data shape = {0}, X shape = {1}, y shape = {2}".format(
    data.shape, X.shape, y.shape))
print(data.head())
print("")

data, X, y = DataSetLoader.load_otto_group()
print("Otto group data:")
print("Data shape = {0}, X shape = {1}, y shape = {2}".format(
    data.shape, X.shape, y.shape))
print(data.head())
print("")

data, X, y = DataSetLoader.load_property_inspection()
print("Property inspection data:")
print("Data shape = {0}, X shape = {1}, y shape = {2}".format(
    data.shape, X.shape, y.shape))
print(data.head())
print("")