Esempio n. 1
0
def createManagementCompanyData(request):
    logger.info("Creating management company Data")
    dataloader = DataLoader(request.cls.dataFile, env)
    dataloader.deleteManagementAndPropertySetup()
    dataloader.createManagementAndProperty()
    request.cls.testdata = dataloader.getData()
Esempio n. 2
0
from datetime import datetime

from utils.DataLoader import DataLoader
from validation.GridSearch import GridSearch

if __name__ == '__main__':

    start = datetime.now()

    print("Imported modules", flush=True)

    dataLoader = DataLoader("dataset4")
    print("data loaded", flush=True)

    healthy = dataLoader.getData(["healthy"], ["THCA", "LUAD"])
    sick = dataLoader.getData(["sick"], ["THCA", "LUAD"])
    data = dataLoader.getData(["sick", "healthy"], ["THCA", "LUAD"])

    grid_search = GridSearch(sick, healthy, data)
    print("got combined data", flush=True)

    table = grid_search.get_table_all_at_once()
    print("table creation done", flush=True)

    grid_search.save_table_to_disk(table, "grid_search_all_at_once_big")
    print("saved table to file", flush=True)

    table = grid_search.get_table_one_vs_rest()
    print("table creation done", flush=True)

    grid_search.save_table_to_disk(table, "grid_search_one_vs_rest_big")
Esempio n. 3
0
    print("Imported modules")

    dataLoader = DataLoader("dataset5")
    dimReducer = DimensionalityReducer()
    analyzer = Analyzer()

    clusVal = ClusterValidator()
    classVal = ClassificationValidator()
    sampler = Sampler()
    print("data loaded")

    #healthy = dataLoader.getData(["healthy"], ["THCA","LUAD"])
    #healthy = sampler.over_sample(healthy)

    start = datetime.now()
    sick = dataLoader.getData(["sick"], ["all"])
    healthy = dataLoader.getData(["healthy"], ["all"])

    gene_labels = dataLoader.getGeneLabels()
    print("got combined data")
    print(datetime.now() - start)

    selected_genes = dimReducer.getOneAgainstRestFeatures(
        sick, healthy, 10, "norm", "exclude")
    """
    #selected_genes = dimReducer.getFeatures(data, 10)
    #selected_genes = dimReducer.getOneAgainstRestFeatures(data, "",5)
    
    #selected_genes = dimReducer.getNormalizedFeatures(sick, healthy, k=10)
    #selected_genes = dimReducer.getOneAgainstRestFeatures(sick, healthy, 10, "norm", "relief")
    #selected_genes = dimReducer.getOneAgainstRestFeatures(sick, healthy, 10, "norm", "exclude")
Esempio n. 4
0
from utils.plot import plotScatter

from utils import Expressions

from validation.Analyzer import Analyzer

print("Imported modules")

dataLoader = DataLoader("dataset4")
dimReducer = DimensionalityReducer()
analyzer = Analyzer()

print("data loaded")

#%%
healthy = dataLoader.getData(["healthy"], ["THCA", "SARC", "LUAD", "GBM"])
#sick = dataLoader.getData(["sick"], ["THCA","GBM"])
gene_labels = dataLoader.getGeneLabels()
print("got combined data")

# %%
selected_genes = dimReducer.getFeatures(healthy)
print("Unsampled")
plotScatter(healthy, selected_genes, gene_labels)

# %%
sampler = Sampler()
print("Standard Sampling")

sampled = sampler.over_sample(healthy, change_labels=True)
plotScatter(sampled, selected_genes, gene_labels)