Skip to content

This is the implementation of general fuzzy min-max neural network and relevant hyperbox-based algorithms

License

Notifications You must be signed in to change notification settings

UTS-AAi/open-gfmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open-gfmm

This is the implementation of general fuzzy min-max neural network and relevant hyperbox-based algorithms

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 faster_onlinegfmm.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11

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: + path to file containing the validation dataset
arg5:  + True: drawing hyperboxes during the training process
       + False: no drawing
arg6:  Maximum size of hyperboxes (teta, default: 1)
arg7:  The minimum value of maximum size of hyperboxes (teta_min: default = teta)
arg8:  gamma value (default: 1)
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])

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

Example:

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

alt text

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.py arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12

Improved version of batch learning - AGGLO2 :

python faster_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.py 1 synthetic_train.dat synthetic_test.dat True 0.6 1 0.5 short min True "[0, 1]"

alt text

Improved version of batch learning - AGGLO2:

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

alt text

About

This is the implementation of general fuzzy min-max neural network and relevant hyperbox-based algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages