let' briefly review the api that we introduced in and all algorithms in scikit-learnwhether preprocessingsupervised learningor unsupervised learning algorithmsare implemented as classes these classes are called estimators in scikitlearn to apply an algorithmyou first have to instantiate an object of the particular classin[ ]from sklearn linear_model import logisticregression logreg logisticregression(the estimator class contains the algorithmand also stores the model that is learned from data using the algorithm you should set any parameters of the model when constructing the model object these parameters include regularizationcomplexity controlnumber of clusters to findetc all estimators have fit methodwhich is used to build the model the fit method always requires as its first argument the data xrepresented as numpy array or scipy sparse matrixwhere each row represents single data point the data is always assumed to be numpy array or scipy sparse matrix that has continuous (floating-pointentries supervised algorithms also require argumentwhich is one-dimensional numpy array containing target values for regression or classification ( the known output labels or responsesthere are two main ways to apply learned model in scikit-learn to create prediction in the form of new output like yyou use the predict method to create new representation of the input data xyou use the transform method table - summarizes the use cases of the predict and transform methods table - scikit-learn api summary estimator fit(x_train[y_train]estimator predict(x_textestimator transform(x_testclassification regression clustering preprocessing dimensionality reduction feature extraction feature selection additionallyall supervised models have score(x_testy_testmethod that allows an evaluation of the model in table - x_train and y_train refer to the training data and training labelswhile x_test and y_test refer to the test data and test labels (if applicablesummary and outlook