Skip to main content

Training a SOM network using nctool in Matlab


1. Type  "nctool" in the command window of Matlab. Then you will get this window.


2. Then click Next. Then in the Get Data from Workspace section, select your dataset file. I use a csv file here. The format of the dataset file is important to consider here. It should be as follows. I use a dataset whose classes are already known. (Even though here we use an unsupervised learning approach)

This is a section of the dataset I have. Just to give you an understanding about the format of the dataset.


The dataset has 218 samples with 17 feature elements. In my dataset file, the samples are oriented as Rows. Therefore I also need to select the Rows radio button in the Select Data window in the nctool. It will be different in your case if features are arranged as rows and each column represents a sample as opposed to the above orientation in my data file.

3. Then click on Next and Finish in the smaller windows that appear when you select your dataset.



4. Then click on Next. In the Network Size window in nctool, define the size of the SOM network you need. The default is 10. Then click on Next and then Train. The SOM is trained now. It is indicated by the window that appears as follows. The training goes for 200 iterations by default.


5. After raining, we can generate different plots easily. For example, click on the SOM Topology button in the above window to see the topology of the SOM network created.

6. Then click Next to get the Evaluate Next window in the nctool. You can do any improvements needed here in this window.

7. Then click Next to get the Save Results window. Here you can save the results that you obtained from training. And also you can generate the M file for reuse if needed. Then click on Finish.

8. Now we have finished training the SOM in the unsupervised way.

Comments

Popular posts from this blog

How to import the Public Certificate of one WSO2 product to the trust store of another?

To demonstrate this point, I will use the 2 products WSO2 API Manager 2.1.0 (referred as APIM from here onwards) and WSO2 Enterprise Integrator 6.1.1 (referred as EI from here onwards). When using EI as the Business Process Server during configuration of Workflows in APIM, one step to perform is to import the public certificate of EI to the truststore of APIM [1]. So now let's see how this can be done. Step 1: Go to <EI_HOME>/repository/resources/security/ folder and execute the following keytool command. This command is used to export the public certificate of EI as a certificate file called wso2carbon.cer. Since the default keystore in EI is wso2carbon.jks, we have specified it as the keystore and the default alias is wso2carbon. Provide wso2carbon as the keystore password when prompted as it is the default password. After executing the above command from within the security folder in EI, you will see that a file with the name of wso2carbon.cer is created...