from plot_module import plot_matrix_grid
import torch
import pandas as pd
import matplotlib

matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import MinMaxScaler,StandardScaler,LabelEncoder
import math
import numpy as np
from plot_module import plot_matrix_grid
from sdv.metadata import Metadata
from sdv.sampling import Condition
from sdv.single_table import CTGANSynthesizer





data1=pd.read_excel("./ATTRACT_da_difetto_a_taglio_ok_e_classificazione_V6.xlsx")
data2=pd.read_excel("./Acquisizione_parametri_produzione.xlsx")
data1=pd.DataFrame(data1,columns=["THICKNESS_TULUS [mm]", "CONTOUR_SPEED [mm/min]", "LASER_POWER [W]",
                           "CONTOUR_GAS_PRESSURE [bar]", "CONTOUR_FOCAL [mm]","FOCAL_LENGTH","DEFECT_TYPE"])
#plot_matrix_grid('v6_data_plot',data1)
data1
data1_corr=data1.corr()
plt.figure(figsize=(10, 8))
sns.heatmap(data1_corr, annot=True, cmap='coolwarm', vmin=-1, vmax=1, center=0)
plt.title('Matrice di Correlazione dati originali')
plt.show()
#merged_data =pd.concat([data1,data2],axis=0)
