Example output
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score
from tpot import TPOTClassifier
# Load your dataset
data = pd.read_csv('bitcoin_data.csv')
# Split your dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(data.drop('price', axis=1), data['price'], test_size=0.2, random_state=42)
# Initialize the TPOT classifier
tpot = TPOTClassifier(generations=5, population_size=20, verbosity=2, scoring='roc_auc')
# Fit the classifier to the training data
tpot.fit(X_train, y_train)
# Get the best model from the TPOT classifier
best_model = tpot.fitted_pipeline_
# Get the AUC score for the model on the test set
auc_score = roc_auc_score(y_test, best_model.predict(X_test))
print(f'AUC score for the best model: {auc_score}')