plotting Iris Classification

Issue The code below classifies three groups of Iris through the Decision Tree classifier. import pandas as pd from sklearn import datasets from sklearn.model_selection import train_test_split, cross_val_score, KFold from sklearn.tree import DecisionTreeClassifier iris = datasets.load_iris() dataset = pd.DataFrame(iris[‘data’], columns=iris[‘feature_names’]) dataset[‘target’]

Continue reading

Removing Horizontal Lines in image (OpenCV, Python, Matplotlib)

Issue Using the following code I can remove horizontal lines in images. See result below. import cv2 from matplotlib import pyplot as plt img = cv2.imread(‘image.png’,0) laplacian = cv2.Laplacian(img,cv2.CV_64F) sobelx = cv2.Sobel(img,cv2.CV_64F,1,0,ksize=5) plt.subplot(2,2,1),plt.imshow(img,cmap = ‘gray’) plt.title(‘Original’), plt.xticks([]), plt.yticks([]) plt.subplot(2,2,2),plt.imshow(laplacian,cmap =

Continue reading