Skip to content

UTS-AAi/comparative-gfmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

comparative-gfmm

This repository contains the implementations of fuzzy min-max neural networks

Before running the python files in this project, we need to install packages first as follows:

Open command line in Windows and navigate to the Hyperbox-classifier folder, and then type the following command:

python setup.py install

Instruction of executing the online version of GFMM (file: onlinegfmm.py):

python onlinegfmm.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10

INPUT parameters from command line:

arg1:  + 1 - training and testing datasets are located in separated files
       + 2 - training and testing datasets are located in the same files
arg2:  path to file containing the training dataset (arg1 = 1) or both training and testing datasets (arg1 = 2)
arg3:  + path to file containing the testing dataset (arg1 = 1)
       + percentage of the training dataset in the input file
arg4:  + True: drawing hyperboxes during the training process
       + False: no drawing
arg5:  Maximum size of hyperboxes (teta, default: 1)
arg6:  The minimum value of maximum size of hyperboxes (teta_min: default = teta)
arg7:  gamma value (default: 1)
arg8:  Operation used to compute membership value: 'min' or 'prod' (default: 'min')
arg9:  Do normalization of datasets or not? True: Normilize, False: No normalize (default: True)
arg10: range of input values after normalization (default: [0, 1])

Note: parameters with string datatype should be put between quotation marks (" ")

Example:

python onlinegfmm.py 1 synthetic_train.dat synthetic_test.dat True 0.6 0.5 1 min True "[0, 1]"

If using Spyder to run the source code, let's configure Spyder as follows:

From Run/Configuration per file or press Ctr+F6, on the open window, select onlinegfmm.py in the field Select a run configuration check on Command line options and input the input parameters such as: 1 synthetic_train.dat synthetic_test.dat True 0.6 0.5 1 min True "[0, 1]".

To the drawing display on the separated window (not inline mode as default), from Tools choose Preferences, and then select IPython console, in tab Graphics let change the value of the field backends to Qt5 or Qt4, choose OK. Finally, restart Spyder to update the changes.

Instruction of executing the batch learning versions of GFMM (files: accelbatchgfmm.py, batchgfmm_v1.py, batchgfmm_v2.py):
Full batch learning:

python batchgfmm_v2.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12

Faster version of full batch learning:

python batchgfmm_v1.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12

Improved version of batch learning - AGGLO2 :

python accelbatchgfmm.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12

INPUT parameters from command line:

arg1:  + 1 - training and testing datasets are located in separated files
       + 2 - training and testing datasets are located in the same files
arg2:  path to file containing the training dataset (arg1 = 1) or both training and testing datasets (arg1 = 2)
arg3:  + path to file containing the testing dataset (arg1 = 1)
       + percentage of the training dataset in the input file
arg4:  + True: drawing hyperboxes during the training process
       + False: no drawing
arg5:  Maximum size of hyperboxes (teta, default: 1)
arg6:  gamma value (default: 1)
arg7:  Similarity threshod (default: 0.5)
arg8:  Similarity measure: 'short', 'long' or 'mid' (default: 'mid')
arg9:  operation used to compute membership value: 'min' or 'prod' (default: 'min')
arg10: do normalization of datasets or not? True: Normilize, False: No normalize (default: True)
arg11: range of input values after normalization (default: [0, 1])   
arg12: Use 'min' or 'max' (default) memberhsip in case of assymetric similarity measure (simil='mid')

For instance:

Full batch learning:

python batchgfmm_v2.py 1 synthetic_train.dat synthetic_test.dat True 0.6 1 0.5 short min True "[0, 1]"

Improved version of batch learning - AGGLO2:

python accelbatchgfmm.py 1 synthetic_train.dat synthetic_test.dat True 0.6 1 0.5 mid min True "[0, 1]"

About

This repository contains the implementations of fuzzy min-max neural networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages