文科PHD.选了一门PYTHON课。。。从来没有code过。
第一次作业,真的一头雾水。
从"C“步就不会了。。。
有人帮忙指点怎么写吗?
有视频讲类似的问题吗?
包子感谢。
Coding problem: Write a self-contained & fully functional Python script
that:
a. Loads the necessary libraries to run (e.g., scikit-learn)
b. Loads the dataset “digits” (see below for description) from the
scikit-learn example datasets contained in sklearn.datasets
c. Instantiates a DecisionTreeClassifier
d. Splits the dataset in training and testing sets using KFold Cross
Validation (use K=10)
e. Trains and Tests the performance of the classifier in identifying the
digits.
f. Computes and outputs the accuracy for each of the 10 folds of cross
validation.
g. Computes and outputs the average accuracy across the 10 folds.