@@ -0,0 +1,2178 @@
+package eu.amidst.tutorial.usingAmidst.examples;%0A%0Aimport eu.amidst.core.datastream.Attribute;%0Aimport eu.amidst.core.datastream.Attributes;%0Aimport eu.amidst.core.datastream.DataOnMemoryListContainer;%0Aimport eu.amidst.core.datastream.DataStream;%0Aimport eu.amidst.core.io.DataStreamWriter;%0Aimport eu.amidst.core.variables.StateSpaceType;%0Aimport eu.amidst.dynamic.datastream.DynamicDataInstance;%0Aimport eu.amidst.dynamic.utils.DataSetGenerator;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.IntStream;%0A%0A%0A/**%0A * Created by rcabanas on 20/05/16.%0A */%0Apublic class CreateCajamarDataDiscreteClass %7B%0A%0A    public static void main(String%5B%5D args) throws Exception%7B%0A%0A        int nContinuousAttributes=0;%0A        int nDiscreteAttributes=5;%0A        String names%5B%5D = %7B%22SEQUENCE_ID%22, %22TIME_ID%22,%22DEFAULT%22,%22Income%22,%22Expenses%22,%22Balance%22,%22TotalCredit%22%7D;%0A        String path = %22datasets/simulated/%22;%0A        int nSamples=1000;%0A        String filename=%22bank_data_test%22;%0A        int seed = filename.hashCode();%0A%0A%0A        //Generate random dynamic data%0A        DataStream%3CDynamicDataInstance%3E data  = DataSetGenerator.generate(seed,nSamples,nDiscreteAttributes,nContinuousAttributes);%0A        List%3CAttribute%3E list = new ArrayList%3CAttribute%3E();%0A%0A%0A        //Replace the names%0A        IntStream.range(0, data.getAttributes().getNumberOfAttributes())%0A                .forEach(i -%3E %7B%0A                    Attribute a = data.getAttributes().getFullListOfAttributes().get(i);%0A                    StateSpaceType s = a.getStateSpaceType();%0A                    Attribute a2 = new Attribute(a.getIndex(), names%5Bi%5D,s);%0A                    list.add(a2);%0A                %7D);%0A%0A%0A        //New list of attributes%0A        Attributes att2 = new Attributes(list);%0A%0A%0A%0A        List%3CDynamicDataInstance%3E listData = data.stream().collect(Collectors.toList());%0A%0A%0A        //Datastream with the new attribute names%0A        DataStream%3CDynamicDataInstance%3E data2 =%0A                new DataOnMemoryListContainer%3CDynamicDataInstance%3E(att2,listData);%0A%0A%0A        //Write to a single file%0A        DataStreamWriter.writeDataToFile(data2, path+filename+%22.arff%22);%0A%0A%0A%0A%0A    %7D%0A%0A%7D%0A

Generate tutorials data discrete