import csv import pandas as pd # Import datafiles # Personal libraries from ML_treatment import componentAnalysis, normalizeData, componentAnalysisLast print('Libaries loaded') # Close all open windows plt.close() dataset = np.loadtxt("Datasets/winequality-white.csv",delimiter=';',skiprows=1) #"Users/groenera/Desktop/file.csv" dataName = 'wineQuality_' # Crop for easy calcualtion analysisDim = -1 componentAnalysisLast(dataset[1:10000,:], 'energyData_raw', analysisDim) #plot preprocessing normalizeData(dataset) #dataset = dataset[0:1000,:] # crop for ease of calculation print('Data set loaded with shape: {}'.format(dataset.shape)) plt.show() # Define Parameters tt_ratios = np.linspace(0.1,0.9, num=2) gammaVals = np.logspace(0.001,100,num=2) # Inititialize lists rvr_errs = []
# Personal libraries from ML_treatment import componentAnalysis, normalizeData, componentAnalysisLast print('libaries loaded') # Close all open windows plt.close() #dataset = np.loadtxt("Datasets/housing.data") #"Users/groenera/Desktop/file.csv" print('data set loaded') # Preprocessing shape = dataset.shape print("Dataset shape is {}x{}".format(shape[0], shape[1])) normalizeData(dataset) componentAnalysisLast(dataset) dataset = np.delete(dataset, 3, axis=1) # 4th dimesion = 3rd element dataset = dataset[:, :] # reduce dataset, remove for large calculations shape = dataset.shape print("Dataset shape is {}x{}".format(shape[0], shape[1])) # Wine dataset dataset = np.loadtxt("Datasets/winequality-white.csv", delimiter=';', skiprows=1) #"Users/groenera/Desktop/file.csv" normalizeData(dataset) print('Data set loaded with shape: {}'.format(dataset.shape)) # Define Parameters tt_ratios = np.linspace(0.1, 0.9, num=2)