Created
January 30, 2021 13:51
-
-
Save grahamharrison68/91e16f8cda2a7970045fb52cf17eabf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import graphviz | |
import pydotplus | |
import matplotlib.image as mpimg | |
import io | |
import random | |
from matplotlib import pyplot as plt | |
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor | |
from sklearn.model_selection import train_test_split, GridSearchCV | |
from sklearn import preprocessing, tree, datasets | |
from dtreeviz.trees import dtreeviz | |
pd.set_option('display.max_rows', 10) | |
random.seed(24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df_red_wine = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv', sep=';') | |
df_white_wine = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv', sep=';') | |
df_red_wine['label'] = 1 | |
df_white_wine['label'] = 0 | |
df_merged_wine = pd.concat([df_red_wine, df_white_wine]) | |
df_merged_wine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment