# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from openml.datasets import list_datasets, get_datasets
import pandas as pd
from sklearn.model_selection import train_test_split
from supervised.automl import AutoML
import os
from prediction_feature.mljar import add_dataset

# + pycharm={"name": "#%%\n"}
dataset_dataframe = list_datasets(output_format="dataframe", number_classes='2..20').query('NumberOfInstances < 100000 & NumberOfFeatures < 1000')
dataset_dataframe

# + pycharm={"name": "#%%\n"}
dataset_ids = dataset_dataframe['did']

# + pycharm={"name": "#%%\n"}
dataset_dataframe_list = get_datasets(dataset_ids=dataset_ids)

# + pycharm={"name": "#%%\n"}
dataset = dataset_dataframe_list[8]

X, y, _, _ = dataset.get_data(
            target=dataset.default_target_attribute)

print(X)
print('y: ')
print(y)


print('\n\n\n\n')

dataset_id = dataset.dataset_id
print(dataset_id)

dataset_dataframe.loc[dataset_id, dataset_dataframe.columns[6:]]

# + pycharm={"name": "#%%\n"}
for i in range(len(dataset_dataframe_list[:5])):
    add_dataset(dataset_dataframe_list[i], dataset_dataframe)

# + pycharm={"name": "#%%\n"}


# + pycharm={"name": "#%%\n"}


StarcoderdataJupyterScriptsDedupFiltered