Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
load() {
return data
//.list((d) => {
// return d.desc.type === 'matrix' && (>d.desc).value.type === VALUE_TYPE_REAL; // return numerical matrices only
//})
.list({'type': 'matrix'}) // use server-side filtering
.then((list: INumericalMatrix[]) => {
const olympicsData: ITacoDataset[] = this.prepareOlympicsData(list);
const tcgaData: ITacoDataset[] = this.prepareTCGAData(list);
const lastfmData: ITacoDataset[] = this.prepareLastFmData(list);
return [].concat(olympicsData, tcgaData, lastfmData);
});
}
load(): Promise {
const promMatrix = data
.list({ 'type': 'matrix' }) // use server-side filtering
.then((list: INumericalMatrix[]) => {
return this.prepareEpochData(list);
});
const promTable = data
.list({ 'type': 'table' })
.then((list: ITable[]) => {
return this.prepareClassLabels(list);
});
return Promise.all([promMatrix, promTable]).then((results: any) => {
const dsc: IMalevoDatasetCollection = results[0];
const tables = results[1];
for (const key of Object.keys(tables)) {
dsc[key].classLabels = tables[key];
}
return dsc;
});
}
public async listData() {
console.log("Trying to list data")
console.log(await listData())
}