Skip to content

Commit ee3fe8f

Browse files
committed
modified plot_elm_comparison to use RandomLayer instead of RandomHiddenLayer
1 parent e32e7f4 commit ee3fe8f

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

plot_elm_comparison.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
from sklearn.linear_model import LogisticRegression
7474

7575
from elm import ELMClassifier
76-
from random_hidden_layer import RBFRandomHiddenLayer
77-
from random_hidden_layer import SimpleRandomHiddenLayer
76+
from random_layer import RBFRandomLayer, SimpleRandomLayer
7877

7978

8079
def get_data_bounds(X):
@@ -137,25 +136,25 @@ def make_classifiers():
137136

138137
# pass user defined transfer func
139138
sinsq = (lambda x: np.power(np.sin(x), 2.0))
140-
srhl_sinsq = SimpleRandomHiddenLayer(n_hidden=nh,
141-
activation_func=sinsq,
142-
random_state=0)
139+
srhl_sinsq = SimpleRandomLayer(n_hidden=nh,
140+
activation_func=sinsq,
141+
random_state=0)
143142

144143
# use internal transfer funcs
145-
srhl_tanh = SimpleRandomHiddenLayer(n_hidden=nh,
146-
activation_func='tanh',
147-
random_state=0)
144+
srhl_tanh = SimpleRandomLayer(n_hidden=nh,
145+
activation_func='tanh',
146+
random_state=0)
148147

149-
srhl_tribas = SimpleRandomHiddenLayer(n_hidden=nh,
150-
activation_func='tribas',
151-
random_state=0)
148+
srhl_tribas = SimpleRandomLayer(n_hidden=nh,
149+
activation_func='tribas',
150+
random_state=0)
152151

153-
srhl_hardlim = SimpleRandomHiddenLayer(n_hidden=nh,
154-
activation_func='hardlim',
155-
random_state=0)
152+
srhl_hardlim = SimpleRandomLayer(n_hidden=nh,
153+
activation_func='hardlim',
154+
random_state=0)
156155

157156
# use gaussian RBF
158-
srhl_rbf = RBFRandomHiddenLayer(n_hidden=nh*2, gamma=0.1, random_state=0)
157+
srhl_rbf = RBFRandomLayer(n_hidden=nh*2, gamma=0.1, random_state=0)
159158

160159
log_reg = LogisticRegression()
161160

0 commit comments

Comments
 (0)