WTC 2017

Daniel George - dgeorge5@illinois.edu

Deep Filtering

Signal Detection

Data

train=Import["/Users/danielg/Documents/Train.mx"];
test=Import["/Users/danielg/Documents/Test.mx"];

ListLinePlot[RandomSample[train,2],PlotRange->All]

Generator function

gen[data_,snr_]:=Join[RandomVariate[NormalDistribution[],{#BatchSize/2,8192}]->False//Thread,snr RandomSample[data,#BatchSize/2]+RandomVariate[NormalDistribution[],{#BatchSize/2,8192}]->True//Thread
]&

ListLinePlot[#,PlotRange->All,ImageSize->Medium]&/@gen[train,5]@<|"BatchSize"->2|>//GraphicsRow

.

Net

chain[nC_Integer,kC_Integer,kP_Integer,sP_Integer,d_Integer]:=
Sequence@@{ConvolutionLayer[nC,{kC},"Dilation"->d]
, PoolingLayer[{kP},"Stride"->sP]
, Ramp};

net = NetChain[
{ReshapeLayer[{1,8192}],
 chain[16, 16, 4, 4, 1],  chain[32, 8, 4, 4, 4], chain[64, 8, 4, 4,4], FlattenLayer[], 64, Ramp, 2,SoftmaxLayer[]},"Input"->8192,"Output"->NetDecoder[{"Class",{True,False}}]]

Training

trainedNet=NetTrain[net,gen[train,5],MaxTrainingRounds->50]

Testing

trainedNet[5 test[[1]]+RandomVariate[NormalDistribution[],8192]]

trainedNet[RandomVariate[NormalDistribution[],8192]]

Parameter Estimation

Deep Transfer Learning

Anomaly Detection (Classification)

Data

data=Import["/Users/danielg/Dropbox/Spectrograms.mx"];

classes=Union@data[[;;,2]]

RandomSample[data,4]

Net

pretrainedNet=NetModel["Inception V3 Trained on ImageNet Competition Data"]

Changing number of classes

modifiedNet=NetChain[Flatten@{Values@Normal@Take[pretrainedNet,{1,-4}],22,SoftmaxLayer[]},"Input"->NetEncoder[{"Image",{299,299}}],"Output"->NetDecoder[{"Class",classes}]]

Fine-tuning (Training)

fineTunedNet=NetTrain[modifiedNet,data]

Semi-supervised Clustering

Truncated Net

truncatedNet=Take[fineTunedNet,{1,-4}]

Unknown classes

unknown=Flatten@Position[data[[;;,2]],"None_of_the_Above"]

Feature Space Plot

FeatureSpacePlot[data[[unknown,1]],FeatureExtractor->truncatedNet]