def predict(self, data_vectorized):
        target_names = ['negative', 'positive']
        #x_test_v_scaled = self.scaler.fit_transform(data_vectorized['x_test_v'])
        x_test_v_scaled = data_vectorized['x_test_v']
        start_time = time.time()
        self.prediction_liblinear = self.Classifier_liblinear.predict(
            x_test_v_scaled)
        self.time_prediction = (time.time() - start_time)
        logging.info("prediction finished - %6.2f seconds " %
                     self.time_prediction)

        # cross validation
        # logging.info("cross validation ... ")
        # start_time = time.time()
        # scores = cross_val_score(self.Classifier_liblinear,
        #                          data_vectorized['x_train_v'],
        #                          data_vectorized['y_train'],
        #                          cv=3, n_jobs=-1)
        #
        # logging.info("Cross-Validation Accuracy: %0.2f (+/- %0.2f)" % (scores.mean(), scores.std() * 2))
        # logging.info("Cross-Validation finished- %6.2f seconds " % (time.time() - start_time))

        # # # Print results in a nice table linearSVC
        logging.info("Results for LinearSVC()")
        logging.info("Training time: %fs; Prediction time: %fs" %
                     (self.time_training, self.time_prediction))
        logging.info(
            classification_report(data_vectorized['y_test'],
                                  self.prediction_liblinear,
                                  target_names=target_names))

        # ### plot top features - only possible for linear and tfidf
        try:
            plotter.plot_coefficients(
                self.Classifier_liblinear,
                data_vectorized['vectorizer'].get_feature_names(),
                fname=self.name)
        except:
            logging.info('feature-plotting not possible')

        io.save_classifier(self.Classifier_liblinear)
    # for ind, i in enumerate(Cs):
    #     plt.plot(Tol, scores[ind], label='C: ' + str(i))
    # plt.legend()
    # plt.xlabel('Los')
    # plt.ylabel('Mean score')
    # plt.show()




    import thesis.Visualization as plotter

    # plot the most informative features of the best pipeline
    features = grid_search.best_estimator_.named_steps['vect'].get_feature_names()
    logging.info(features[0])
    logging.info(len(features))
    clf = grid_search.best_estimator_.named_steps['clf']
    plotter.plot_coefficients(clf, features,fname='test')

    # show best accuracy from the 4 fold cross validation with the validation data
    print("Best score: %0.3f" % grid_search.best_score_)
    print("Best parameters set:")
    best_parameters = grid_search.best_estimator_.get_params()
    for param_name in sorted(parameters.keys()):
        print("\t%s: %r" % (param_name, best_parameters[param_name]))

    # print classification_report with the unseen testing data
    clf = grid_search.best_estimator_
    prediction = clf.predict(data['x_test'])
    target_names = ['negative', 'positive']
    print(classification_report(data['y_test'], prediction, target_names=target_names))