APPLICATION OF SUPERVISED LEARNING
PERCEPTRON
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
this is a constructor, it creates new objects with given attributes
|
|
this is a constructor, it creates a class
|
|
this is a destructor, it removes class objects
|
|
it is an initializer, it initializes class objects
|
Detailed explanation-1: -The init method is the Python equivalent of the C++ constructor in an object-oriented approach. The init function is called every time an object is created from a class. The init method lets the class initialize the object’s attributes and serves no other purpose. It is only used within classes.
Detailed explanation-2: -” init ‘’ is a reseved method in python classes. It is called as a constructor in object oriented terminology.
Detailed explanation-3: -The python init method is declared within a class and is used to initialize the attributes of an object as soon as the object is formed. While giving the definition for an init (self) method, a default parameter, named ‘self’ is always passed in its argument. This self represents the object of the class itself.