inputs: # Import 'make_scorer', 'DecisionTreeRegressor', and 'GridSearchCV'
from sklearn.metrics import make_scorer
from sklearn.tree import DecisionTreeRegressor
from sklearn import grid_search

def fit_model(X, y):
    """ Performs grid search over the 'max_depth' parameter for a 
        decision tree regressor trained on the input data [X, y]. """
    
    # Create cross-validation sets from the training data
    cv_sets = ShuffleSplit(X.shape[0], n_iter = 10, test_size = 0.20, random_state = 0)

    # Create a decision tree regressor object
    regressor = DecisionTreeRegressor()

    # Create a dictionary for the parameter 'max_depth' with a range from 1 to 10
    params = {'max_depth' : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}

    # Transform 'performance_metric' into a scoring function using 'make_scorer' 
    scoring_fnc = make_scorer(performance_metric)

    # Create the grid search object
    grid = grid_search.GridSearchCV(regressor, params, cv=cv_sets, scoring=scoring_fnc) 

    # Fit the grid search object to the data to compute the optimal model
    grid = grid.fit(X, y)

    # Return the optimal model after fitting the data
    return grid.best_estimator_
Given the above code, generate some markdown instructions for it.

targets: 
Question 5 - Bias-Variance Tradeoff
When the model is trained with a maximum depth of 1, does the model suffer from high bias or from high variance? How about when the model is trained with a maximum depth of 10? What visual cues in the graph justify your conclusions?
Hint: How do you know when a model is suffering from high bias or high variance?
Answer:  
With a max depth of 1 the model suffers from high bias, because the model is not comlex enough which leads to low accuracy.
With a max depth of 10 the model suffers from high variance, because the model was trained with too many details from the training set and it overfits their characteristics on the whole dataset. 
When we a have a bias error - training and validation curves are drawn together, but with a very low accuracy score. High variance on the other hand looks like the curves with a max depth of 10: high accuracy score on a training data, low - on a whole dataset due to the overfitting. 
Question 6 - Best-Guess Optimal Model
Which maximum depth do you think results in a model that best generalizes to unseen data? What intuition lead you to this answer?
Answer: 
A model with a max_depth of 3 is the best among others, because it is very consistent in scoring on testing and validation data and also having the highest score (R squared) of around 0.8. Other models, especially the first and the last one are useless, as they can't predict data correctly at all (first has a huge bias, last has a huge variance).  

Evaluating Model Performance
In this final section of the project, you will construct a model and make a prediction on the client's feature set using an optimized model from fit_model.
Question 7 - Grid Search
What is the grid search technique and how it can be applied to optimize a learning algorithm?
Answer: 
GridSearch is a way of systematically working through multiple combinations of parameter tunes, cross-validating as it goes to determine which tune gives the best performance.
Question 8 - Cross-Validation
What is the k-fold...