C++ Neural Networks and Fuzzy Logic: Preface


A New Layer Class for a Kohonen Layer



Download 1,14 Mb.
Pdf ko'rish
bet236/443
Sana29.12.2021
Hajmi1,14 Mb.
#77367
1   ...   232   233   234   235   236   237   238   239   ...   443
Bog'liq
C neural networks and fuzzy logic

A New Layer Class for a Kohonen Layer

The next step to take is to create a Kohonen_layer class and a Kohonen_network class. This is shown in

Listing 11.2.

Listing 11.2 The Kohonen_layer class and Kohonen_network class in layerk.h

// layerk.h           V.Rao, H. Rao

// header file for the Kohonen layer and

// the Kohonen network

class Kohonen_network;

class Kohonen_layer: public layer

{

protected:



       float * weights;

C++ Neural Networks and Fuzzy Logic:Preface

Revisiting the Layer Class

224



       int winner_index;

       float win_distance;

       int neighborhood_size;

       friend Kohonen_network;

public:

        Kohonen_layer(int, int, int);

        ~Kohonen_layer();

        virtual void calc_out();

        void randomize_weights();

        void update_neigh_size(int);

        void update_weights(const float);

        void list_weights();

        void list_outputs();

        float get_win_dist();

};

class Kohonen_network



{

private:


        layer *layer_ptr[2];

        int layer_size[2];

        int neighborhood_size;

public:


        Kohonen_network();

        ~Kohonen_network();

        void get_layer_info();

        void set_up_network(int);

        void randomize_weights();

        void update_neigh_size(int);

        void update_weights(const float);

        void list_weights();

        void list_outputs();

        void get_next_vector(FILE *);

        void process_next_pattern();

        float get_win_dist();

        int get_win_index();

};

The Kohonen_layer is derived from the layer class, so it has pointers inherited that point to a set of outputs



and a set of inputs. Let’s look at some of the functions and member variables.

Previous Table of Contents Next

Copyright ©

 IDG Books Worldwide, Inc.

C++ Neural Networks and Fuzzy Logic:Preface

Revisiting the Layer Class

225




Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   232   233   234   235   236   237   238   239   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish