0

I would like to classify my dataset with PyCaret. I have already read up on Pycaret, but I don't understand why I get an empty list when I create the models with the compare_models() function.

Since I am still quite new to the topic, I might have made a logical thinking error.

My goal is to predict, based on the other parameters like the weather data, the number of bikes needed (cnt)

Multiclass Classification with PyCaret Dataset: https://www.kaggle.com/datasets/hmavrodiev/london-bike-sharing-dataset

import pandas as pd
from pycaret.classification import *
dataset = pd.read_csv('london_merged.csv')
data


dataset = dataset.sample(frac=1)
data = dataset.sample(frac=0.90, random_state=785).reset_index(drop=True)
data_unseen = dataset.drop(data.index).reset_index(drop=True)

print('Data for Modeling: ' + str(data.shape))
print('Unseen Data For Predictions: ' + str(data_unseen.shape))

# set limits
bins = [0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000]

# Assign categories
data["cnt"] = pd.cut(data["cnt"], bins)

data = data.dropna(subset=["cnt"])

exp_mclf101 = setup(data = data, target = 'cnt', session_id=123)

compare_models()

Output of the last part of the Code

0 Answers0