<jupyter_start><jupyter_text>This code is from reviewing the guide at: https://scikit-learn.org/stable/tutorial/basic/tutorial.htmlloading-an-example-dataset<jupyter_code>from sklearn import datasets
iris = datasets.load_iris()
digits = datasets.load_digits()
print(digits.data)
digits.target
from sklearn import svm
clf = svm.SVC(gamma=0.001, C=100.)<jupyter_output><empty_output><jupyter_text>For the training set, we’ll use all the images from our dataset, except for the last image, which we’ll reserve for our predicting. We select the training set with the [:-1] Python syntax, which produces a new array that contains all but the last item from digits.data<jupyter_code>clf.fit(digits.data[:-1], digits.target[:-1])
clf.predict(digits.data[-1:])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11125319693094629, 'fraction_numerical': 0.014066496163682864, 'mean_word_length': 6.386792452830188, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '649787', 'license': 'MIT', 'n_tokens_mistral': 275, 'n_tokens_neox': 263, 'n_words': 73, 'path': 'scikit-LearningAndPredicting.ipynb', 'repo_name': 'rwwinfree/MLIntro-scikit-learn', 'size': '782'}