text_html_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

earning = pd.read_csv('/kaggle/input/cusersmarildownloadsearningcsv/earning.csv', delimiter=';')
data = earning[['year', 'femalesmanagers', 'malemanagers', 'personmanagers', 'femalemachineryoperatorsanddrivers', 'malemachineryoperatorsanddrivers', 'personmachineryoperatorsanddrivers', 'femalesalesworkers', 'malesalesworkers', 'personsalesworkers']]
data.columns = ['year', 'manager_f', 'manager_m', 'manager_tot', 'operator_f', 'operator_m', 'operator_tot', 'sales_f', 'sales_m', 'sales_tot']
data

plt.xlim(2004, 2017)

new_data = pd.DataFrame({'year': data['year'], 'manager': data['manager_m'] - data['manager_f'], 'operator': data['operator_m'] - data['operator_f'], 'sales': data['sales_m'] - data['sales_f']})
new_data.index = new_data['year']
new_data = new_data.drop('year', axis=1)
new_data

np.random.seed(14)
NUM = 1000
p = 0.5
q = 1 - p
feat1_cl1 = np.random.normal(10, 1, int(NUM * p))
feat2_cl1 = np.random.normal(4, 2, int(NUM * p)) * 0.2 * feat1_cl1 + np.random.random(int(NUM * p))
t_cl1 = np.array([0] * int(NUM * p))
feat1_cl2 = np.random.normal(3, 2, int(NUM * q))
feat2_cl2 = np.random.normal(-1, 1, int(NUM * q)) * 2 * feat1_cl2 + np.random.random(int(NUM * q))
t_cl2 = np.array([1] * int(NUM * q))
plt.scatter(feat1_cl1, feat2_cl1, color='red', label='Klasse 1')
plt.scatter(feat1_cl2, feat2_cl2, color='green', label='Klasse 2')
plt.title('feat1 vs feat2')
plt.xlabel('Feature 1')
plt.ylabel('Feature 2')
plt.legend()
plt.style.use('seaborn')
plt.show()