## Ex 10.2 1+1 print("Hello World") a = 5 a ## Ex 10.3 # URL: https://sbcb.inf.ufrgs.br/data/cumida/Genes/Lung/GSE74706/Lung_GSE74706.csv import pandas as pd file_path = "../input/lungcancer/Lung_GSE74706.csv" lungcancer_df = pd.read_csv(file_path) lungcancer_df labels_df = lungcancer_df["type"] features_df = lungcancer_df.drop(["type", "samples"], axis=1) features_df.T.describe() labels_df.value_counts() features_df.mean().hist() ## Ex 10.4 import numpy as np from sklearn.svm import LinearSVC from sklearn.decomposition import PCA from sklearn.preprocessing import scale from mlxtend.plotting import plot_decision_regions X = features_df.to_numpy() y = np.where(labels_df == "normal", 0, 1) pca = PCA(n_components=2) X_std = scale(X) X_pc2 = pca.fit_transform(X_std) X_pc2 = scale(X_pc2) svm = LinearSVC() svm.fit(X_pc2, y) plot_decision_regions(X=X_pc2, y=y, clf=svm)