CoCalc Public Filesempty.ipynbOpen with one click!
Authors: Jim Chen, Ricky Grannis-Vu, Ge Zhang, Amy Zhang, jiajai hu, shagun jhaver
Views : 55
Compute Environment: Ubuntu 20.04 (Default)
In [ ]:

Import libraries

output
plt:<matplotlib.pyplot>
datasets:<sklearn.datasets>
svm:<sklearn.svm>
metrics:<sklearn.metrics>
train_test_split:<sklearn.model_selection.train_test_split>
np:<numpy>

In [ ]:

Data preprocessing

Load dataset

input
datasets: <sklearn.datasets>
output
digits: <dict>

In [ ]:

Explore

input
digits: <dict>
output

In [ ]:

Transform dataset

input
digits: <dict>
output
n_samples: <int>
data: <numpy.ndarray>

In [ ]:

Modeling

Create method

output
classifier: <slearn.method>

In [ ]:

Split dataset

input
data: <numpy.ndarray>
digits: <dict>
output
X_train:<numpy.ndarray>
X_test:<numpy.ndarray>
y_train:<numpy.ndarray>
y_test:<numpy.ndarray>

In [ ]:

Train model

input
X_train:<numpy.ndarray>
y_train:<numpy.ndarray>

In [ ]:

Get predictions

input
X_test:<numpy.ndarray>
output
predicted:<numpy.ndarray>