Skip to main content

Posts

Gradient Descent with RSME

Optimization Alorithms Ex : G.D. , S.D. ,  Adam, RMS prop , momentum , adelta Gradient Descent is an  optimization algorithm that find a best fit line and local minima of a differentiable function for given training data set. S imply used to find the coefficients (weights) and intercept (bias) that minimize a cost function as far as possible.  There are three types of  g radient descent techniques:   Regular Batch GD (Gradient Descent) -  Studiously descend the curve in one path towards one minima ; every hop calculates the cost function for entire training data. If training data is large, one should not use this. Random GD (Stochastic GD) -   Calculates the Cost function for only one (randomly selected) training data per hop ; tend to jump all over the place due to randomness but due to it actually jump across minima’s.  Mini Batch gradient descent - Somewhere midway between the above 2. Does the calculation for a bunch of random data poin...

How to get a current time and date using pyhton ?

 Here are some examples using datatime module to get current time and date # %% Import necessary library from  datetime  import  date , time , timezone , datetime # %% Run using function .now to get right present time datetime.now() ... datetime.datetime(2020, 8, 31, 11, 23, 42, 962037) # %% dt = datetime.now() dt.strftime( '%c' ) ... 'Mon Aug 31 10:45:55 2020' # %% To get only time t = dt.time() t.strftime( '%r' ) ... '10:45:55 AM' # %% To get only date d = date.today() d.isoformat() ... '2020-08-31' # %% You can also use this for various style a.strftime( '%m-%d' ) # month and date ... '08-31' a.strftime( '%m-%a' ) # month and day '08-Mon'

Collection in python

There are basic two datatypes in python  1. Immutable datatype : numeric , string , tuple 2. Mutable : list , dictionary , set Immutable  : Content cannot be changed or modified using the indexing operator ( assignment  statement ) Mutable  : Content can be changed or modified using the indexing operator ( assignment  statement ) Numeric : int, float , complex numbers Sequence : list, string, tuple, range Mapping : dictionary Set : set , frozenset Boolean : is used for making more conditions for 'if' in True and False form Collections in python : 1) Dictionary : It is used to map arbitrary keys to value Only immutable ( content can be changed ) objects can be used as keys to dictionaries Ex :  D = { 'a' : 10 , 'b' : [20, 30] }                   2)  List : It can collect multiple values, multiple types of objects and data collection in single variable.  It is mutable. So...

About Easy Pycodes

 Hi, I'm Kushal. Now I'm learning Python and Machine learning. Intrested in robotics but I'm not an IT engineer, where I found an very easy and simple language so that the reason I chose python programming language for Machine learning. During my study I faced many of problems and difficulties during making programs without import modules and with modules. So I making whole assignment in blog form where I share my knowledge to other beginners like me. Phone : (+91) 7623935068   Email id : rezkzar@gmail.com 

Class and Object

The class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name. The class definition looks like : class Class_Name: Statement 1 Statement 2  ……. Statement N The statements inside a class definition will usually be function definitions, but other statements are also allowed. When a class definition is entered, a new namespace is created, and used as the local scope thus, all assignments to local variables go into this new namespace. 

How memory is managed in Python?

Memory management in Python involves a private heap containing all Python objects and data structures. The management of this private heap is ensured internally by the Python memory manager. The Python memory manager has different components which deal with various dynamic storage management aspects, like sharing, segmentation or preallocation. If some contents or data doesn't used by user for a long time it is deleted by garbage collector provided by Python.