Skip to content

Instantly share code, notes, and snippets.

View gprzy's full-sized avatar

Gabriel Przytocki gprzy

View GitHub Profile
@gprzy
gprzy / dt_name.py
Last active March 7, 2023 04:45
A Decision Tree learns how to write my name
import string; import numpy as np; from functools import reduce
from sklearn.preprocessing import MinMaxScaler; from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier()
clf.fit(np.reshape(list(range(1,27)),(-1,1)),
list(string.ascii_lowercase))
scaler = MinMaxScaler(feature_range=(1,26))