andrewre23 / sofenn

Self-Organizing Fuzzy Neural Network
MIT License
22 stars 11 forks source link

Self Organizer loop #1

Open HafsaaOuifak opened 3 years ago

HafsaaOuifak commented 3 years ago

Hello, Thank you for sharing. I think the while loop in the self organizer should be replaced with an "OR" instead of the "AND" so we can end up with a model which is good at generalization and where there is neurons that can cluster the input vector at the same time. Greetings.

andrewre23 commented 3 years ago

Hi Hafsaa,

If we want a model that can both generalize AND cluster the input vector well, then we'd need to use the AND operator. OR would only ensure that one of the conditions are met, not both. Perhaps I misunderstood your question?

-Andrew

abbasyazdinejad commented 2 years ago

@HafsaaOuifak, Did you can run Self Organizer fuzzy DNN and test it?

RichieChilipa commented 1 year ago

I have been trying to train a time series classification model using the Fuzzy Network but I am getting this error:

TypeError Traceback (most recent call last) Cell In[87], line 1 ----> 1 fuzz = FuzzyNetwork( 2 X_train, X_test, y_train, y_test, # data attributes 3 neurons=3, s_init=4, max_neurons=200, # initialization parameters 4 eval_thresh=0.5, ifpart_thresh=0.1354 # evaluation and ifpart threshold 5 )

Cell In[7], line 163, in FuzzyNetwork.init(self, X_train, X_test, y_train, y_test, neurons, max_neurons, ifpart_thresh, ifpart_samples, err_delta, prob_type, debug, kwargs) 161 # define model and set model attribute 162 self.model = None --> 163 self.build_model(kwargs)

Cell In[7], line 224, in FuzzyNetwork.build_model(self, **kwargs) 222 phi = fuzz(inputs) 223 psi = norm(phi) --> 224 f = weights([inputs, psi]) 225 raw_output = raw(f) 226 final_out = raw_output

File ~/anaconda3/lib/python3.10/site-packages/keras/utils/traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs) 67 filtered_tb = _process_traceback_frames(e.traceback) 68 # To get the full stack trace, call: 69 # tf.debugging.disable_traceback_filtering() ---> 70 raise e.with_traceback(filtered_tb) from None 71 finally: 72 del filtered_tb

File /var/folders/rx/2rch_5gs0rj783vwdcdrtkpw0000gn/T/autograph_generated_fileaf0b2n9f.py:42, in outer_factory..inner_factory..tfcall(self, x, **kwargs) 40 assert ag.converted_call(ag.ld(len), (ag.ld(x),), None, fscope) == 2 41 (x, psi) = ag.ld(x) ---> 42 b = ag.converted_call(ag.ld(K).ones, ((ag.converted_call(ag.ld(K).tf.shape, (ag.ld(x),), None, fscope)[0], 1),), dict(dtype=ag__.ld(x).dtype), fscope) 43 aligned_b = ag.converted_call(ag.ld(K).concatenate, ([ag.ld(b), ag__.ld(x)],), None, fscope) 44 aligned_a = ag__.ld(self).a

TypeError: Exception encountered when calling layer "Weights" (type WeightedLayer).

I have tried updating Tensorflow to no avail

HafsaaOuifak commented 1 year ago

@RichieChilipa You can find here the requirements I ve used to run it. https://github.com/HafsaaOuifak/SOFNN For tensorflow, I used this version: tensorflow==1.13.1 tensorflow-estimator==1.13.0

RichieChilipa commented 1 year ago

Thank you for your response.

On Thu, May 25, 2023 at 10:31 PM HafsaaOuifak @.***> wrote:

@RichieChilipa https://github.com/RichieChilipa You can find here the requirements I ve used to run it. https://github.com/HafsaaOuifak/SOFNN For tensorflow, I used this version: tensorflow==1.13.1 tensorflow-estimator==1.13.0

— Reply to this email directly, view it on GitHub https://github.com/andrewre23/sofenn/issues/1#issuecomment-1563471066, or unsubscribe https://github.com/notifications/unsubscribe-auth/A474AAELAQ4H6AV7DSVAJRLXH66SNANCNFSM5DRCOVKQ . You are receiving this because you were mentioned.Message ID: @.***>