Scenario 2 - Epileptic Seizure Classification
================================================

Configuration loaded: 3 folds, 2 feature options, 2 radius options.
Loading dataset from ./Datasets/epileptic_seizure_data.csv ...
Dataset loaded: 11500 samples, 178 features, 5 classes.

Splitting data into train/val/test (60/20/20%)...
-> train: 6900  val: 2300  test: 2300
Applying z-score normalization...

GRID SEARCH (features × radius) using 3-fold CV

[GRID] features= 5, radius=0.50 ... 
-> Fold 1/3 ... 
ANFIS info:
	Number of nodes: 92
	Number of linear parameters: 7
	Number of nonlinear parameters: 70
	Total number of parameters: 77
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 7
Minimal training RMSE = 1.13032
Minimal checking RMSE = 1.13236
Overall Accuracy: 30.61%
Cohen's Kappa   : 0.169
kappa=0.169 rules=7

-> Fold 2/3 ... 
ANFIS info:
	Number of nodes: 140
	Number of linear parameters: 11
	Number of nonlinear parameters: 110
	Total number of parameters: 121
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 11
Minimal training RMSE = 1.12499
Minimal checking RMSE = 1.15105
Overall Accuracy: 39.43%
Cohen's Kappa   : 0.289
kappa=0.289 rules=11

-> Fold 3/3 ... 
ANFIS info:
	Number of nodes: 128
	Number of linear parameters: 10
	Number of nonlinear parameters: 100
	Total number of parameters: 110
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 10
Minimal training RMSE = 1.13166
Minimal checking RMSE = 1.12551
Overall Accuracy: 34.91%
Cohen's Kappa   : 0.225
kappa=0.225 rules=10

-> mean Kappa=0.227  mean rules=9

[GRID] features= 5, radius=0.75 ... 
-> Fold 1/3 ... 
ANFIS info:
	Number of nodes: 68
	Number of linear parameters: 5
	Number of nonlinear parameters: 50
	Total number of parameters: 55
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 5
Minimal training RMSE = 1.12389
Minimal checking RMSE = 1.12597
Overall Accuracy: 33.17%
Cohen's Kappa   : 0.210
kappa=0.210 rules=5

-> Fold 2/3 ... 
ANFIS info:
	Number of nodes: 68
	Number of linear parameters: 5
	Number of nonlinear parameters: 50
	Total number of parameters: 55
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 5
Minimal training RMSE = 1.15261
Minimal checking RMSE = 1.16568
Overall Accuracy: 34.30%
Cohen's Kappa   : 0.240
kappa=0.240 rules=5

-> Fold 3/3 ... 
ANFIS info:
	Number of nodes: 68
	Number of linear parameters: 5
	Number of nonlinear parameters: 50
	Total number of parameters: 55
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 5
Minimal training RMSE = 1.14349
Minimal checking RMSE = 1.13975
Overall Accuracy: 34.65%
Cohen's Kappa   : 0.226
kappa=0.226 rules=5

-> mean Kappa=0.225  mean rules=5

[GRID] features= 8, radius=0.50 ... 
-> Fold 1/3 ... 
ANFIS info:
	Number of nodes: 209
	Number of linear parameters: 11
	Number of nonlinear parameters: 176
	Total number of parameters: 187
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 11
Minimal training RMSE = 1.11568
Minimal checking RMSE = 1.12592
Overall Accuracy: 35.26%
Cohen's Kappa   : 0.224
kappa=0.224 rules=11

-> Fold 2/3 ... 
ANFIS info:
	Number of nodes: 209
	Number of linear parameters: 11
	Number of nonlinear parameters: 176
	Total number of parameters: 187
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 11
Minimal training RMSE = 1.08705
Minimal checking RMSE = 1.11471
Overall Accuracy: 35.48%
Cohen's Kappa   : 0.226
kappa=0.226 rules=11

-> Fold 3/3 ... 
ANFIS info:
	Number of nodes: 209
	Number of linear parameters: 11
	Number of nonlinear parameters: 176
	Total number of parameters: 187
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 11
Minimal training RMSE = 1.12397
Minimal checking RMSE = 1.12198
Overall Accuracy: 35.65%
Cohen's Kappa   : 0.230
kappa=0.230 rules=11

-> mean Kappa=0.227  mean rules=11

[GRID] features= 8, radius=0.75 ... 
-> Fold 1/3 ... 
ANFIS info:
	Number of nodes: 119
	Number of linear parameters: 6
	Number of nonlinear parameters: 96
	Total number of parameters: 102
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 6
Minimal training RMSE = 1.12245
Minimal checking RMSE = 1.12803
Overall Accuracy: 32.70%
Cohen's Kappa   : 0.196
kappa=0.196 rules=6

-> Fold 2/3 ... 
ANFIS info:
	Number of nodes: 173
	Number of linear parameters: 9
	Number of nonlinear parameters: 144
	Total number of parameters: 153
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 9
Minimal training RMSE = 1.10065
Minimal checking RMSE = 1.12512
Overall Accuracy: 37.09%
Cohen's Kappa   : 0.251
kappa=0.251 rules=9

-> Fold 3/3 ... 
ANFIS info:
	Number of nodes: 101
	Number of linear parameters: 5
	Number of nonlinear parameters: 80
	Total number of parameters: 85
	Number of training data pairs: 4600
	Number of checking data pairs: 2300
	Number of fuzzy rules: 5
Minimal training RMSE = 1.13562
Minimal checking RMSE = 1.13557
Overall Accuracy: 33.00%
Cohen's Kappa   : 0.196
kappa=0.196 rules=5

-> mean Kappa=0.214  mean rules=7

BEST HYPERPARAMS
features=5  radius=0.50  CV Kappa=0.227  mean rules=9

Training final model on train+val with best params ...

ANFIS info:
	Number of nodes: 80
	Number of linear parameters: 6
	Number of nonlinear parameters: 60
	Total number of parameters: 66
	Number of training data pairs: 9200
	Number of checking data pairs: 2300
	Number of fuzzy rules: 6

Minimal training RMSE = 1.14268
Minimal checking RMSE = 1.1463
Final training complete: 6 rules.

Evaluating on TEST set ...
Overall Accuracy: 29.78%
Cohen's Kappa   : 0.158

[TEST RESULTS]
  OA   = 29.78 %
  Kappa= 0.158
  Rules= 6

Generating figures ...

Done. Figures saved in: figures_scn2
