<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Get some data to play with
Step1:  Really Simple API
0) Import your model class
Step2:  1) Instantiate an object and set the parameters
Step3:  2) Fit the model
Step4:  3) Apply / evaluate
Step5:  And again
Step6:  Exercises
Load the iris dataset from the sklearn.datasets module using the load_iris function.
Split it into training and test set using train_test_split.
Then train an evaluate a classifier of your choice.
<ASSISTANT_TASK:>
Python Code:
from sklearn.datasets import load_digits
digits = load_digits()
from sklearn.cross_validation import train_test_split
X_train, X_test, y_train, y_test = train_test_split(digits.data,
                                                    digits.target)
X_train.shape
Explanation: Get some data to play with
End of explanation
from sklearn.svm import LinearSVC
Explanation: Really Simple API
0) Import your model class
End of explanation
svm = LinearSVC(C=0.1)
Explanation: 1) Instantiate an object and set the parameters
End of explanation
svm.fit(X_train, y_train)
Explanation: 2) Fit the model
End of explanation
print(svm.predict(X_test))
svm.score(X_train, y_train)
svm.score(X_test, y_test)
Explanation: 3) Apply / evaluate
End of explanation
from sklearn.ensemble import RandomForestClassifier
rf = RandomForestClassifier(n_estimators=50)
rf.fit(X_train, y_train)
rf.score(X_test, y_test)
%load https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/examples/classification/plot_classifier_comparison.py
Explanation: And again
End of explanation
# %load solutions/train_iris.py
Explanation: Exercises
Load the iris dataset from the sklearn.datasets module using the load_iris function.
Split it into training and test set using train_test_split.
Then train an evaluate a classifier of your choice.
End of explanation
<END_TASK>