-
Notifications
You must be signed in to change notification settings - Fork 0
/
Example1.asv
45 lines (35 loc) · 1.79 KB
/
Example1.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Example 1: Classification of multi-omics data using the DeepInsight-3D model
%
% In this Example, multi-omics example data (saved in Data folder as
% dataset1.mat) is first converted to images using DeepInsight3D converter.
% Then CNN net (resnet-50) is applied for training the model. The
% performance evaluation (accuracy, AUC) is done on the test set of the
% data.
%
% Example data is "PDX Paclitaxel multi-omics" data (dataset1.mat)
clear all;
close all hidden;
% 1. Set up parameters by changing Parameter.m file, otherwise leave it with default values.
% 2. Provide the path of dataset in Parameter.m file by chaning the "Data_path" variable.
DSETnum = 4;%30;%10;%15;%10;%1; %This means the stored data in your defined path is dataset1.mat
% dataset(DSETnum)
Parm = Parameters(DSETnum); % Define parameters for DeepInsight3D and CNN
% NOTE: 1) Set "Parm.miniBatchSize" based on your GPU requirements.
% by default Parm.miniBatchSize = 512.
%
% 2) Set execution environment (for trainingOptions). By default it
% is set to 'multi-gpu'.
[AUC,C,Accuracy,ValErr] = DeepInsight3D(DSETnum,Parm);
% NOTE: 1) You may use separately image conversion function using the file
% func_Prepare_Data.m
%
% 2) func_TrainModel performs CNN modeling. Some pretrained nets are
% given and 1 custom made are given. However, please prepare your own
% nets as per required.
% Define the folder where the model files and figures to be stored.
% By default Parm.FileRun = 'Run1' and Parm.Stage=1 (change as required)
% Then execute the following commands.
% Save model files
func_SaveModels(Parm); % model files will be stored in ~/DeepInsight3D/Models/Run1/Stage1/ (if DSETnum=1)
% Save all figures
func_SaveFigs(Parm); % all figures will be stored in ~/DeepInsight3D_pkg/FIGS/Run1/Stage1/