Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,150,241 members, 7,807,818 topics. Date: Wednesday, 24 April 2024 at 07:48 PM |
Nairaland Forum / Gbolly1151's Profile / Gbolly1151's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 16 pages)
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:02pm On May 24, 2020 |
HOW TO USE LAMBDA The format of lambda is as below [lambda keyword] [arguments[seperated by comma]] [semicolon] [logic]
|
Programming / Re: Python 3: Exercises And Solutions. by gbolly1151(m): 4:40pm On May 24, 2020 |
Reserve |
Programming / Re: Python 3: Exercises And Solutions. by gbolly1151(m): 3:29pm On May 24, 2020 |
SKYQUEST: I think read_csv take optional argument delimiter which can be comma,using spaxe should work |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:39pm On May 22, 2020 |
iCode2:I started learning python few years ago and am a self-taught |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 3:43pm On May 22, 2020 |
HOW TO SWAP AN OBJECT
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 2:32pm On May 22, 2020 |
REMINDER: Range has step argument range(start,stop,step) Note that start and step are optional How to use step in range to print odd and even
|
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 12:05pm On May 22, 2020 |
What is activation? Here is the flow from input to output (Input(x) >>>> sum(a+bx) >>>> activate >>>> output) Every perceptron has activation,by default activation is 1 if (a+bx) >= 0 and 0 if (a+bx) < 0 Activation is what help to transform the result of (a+bx),they take a+bx as input inside a perceptron. This is needed to reach our desire output Y in fast manner. So let z=a+bx We have various type of activation,some are; 1.relu: The rectified linear unit function, returns f(z) = max(0, z). 2.logistic: The logistic sigmoid function, returns f(z) = 1 / (1 + exp(-z)). 3.identity: No-op activation, useful to implement linear bottleneck, returns f(z) = z 4. tanh: The hyperbolic tan function, returns f(z) = tanh(z). Let update our code
|
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 5:08pm On May 21, 2020 |
scarplanet:Hmm....ikena boss |
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 2:54am On May 21, 2020 |
faithfull18:Pick up your o or A level textbook they are there, linear algebra |
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 10:40pm On May 20, 2020 |
What is perceptron? Perceptron is the simplest network that accept input(x) or inputs(X1....Xn), multiplying the input by weight (b) making it (bx),adding bias (a) to it,then activating the function (a + bx) using various activation function like sigmiod to produce predicted output(YP). by default activation is 1 if (a+bx) >= 0 and 0 if (a+bx) < 0 Here is the flow Input(x) >>>> sum(a+bx)>>>> activate >>>>output
Activation function is what help to produce predicted output(YP) that is closer to Y. Sigmoid function is sigmiod(z) = 1/1+e^-z ,it is one of activation function In real world input(x) are more that 1 e.g Input1 = [0,1,0,1] output=1 input2= [1,1,0,1] output = 0 In this case Y= a + b1.x1 + b2.x2 + b3.x3 + b4.x4 1 Like |
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 10:08pm On May 20, 2020 |
scarplanet:Hmm...praise? |
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 7:39pm On May 20, 2020 |
iCode2:Hmm...it is possible to see that equation in physics but it is math [linear equation] |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 4:33pm On May 20, 2020 |
How to create a simple singleton without decorator Decorator is one of the popular way of creating singleton in python but we wont be using decorator here. before i move to code let me define singleton,it is a way of creating a single object of a class or function. In a program where you only need a single instance of a class you can create a Singleton.
|
Programming / Re: Let Learn Artificial Neutral Network by gbolly1151(m): 12:36pm On May 20, 2020 |
The backbone or foundation of deep learning is from this equation below
A typical question to throw to the network is if Y= 1 and X=0 find a and b How ANN find a and b is as follows 1. first get random value for a and b 2. Calculate Y from x using a and b generated (a + bx) 3. If output is not equal to Y,update a and b and try again On a norm we can do this by bruce-force method but it consume a lot of time and resources to find the real a and b How ANN minimize the error is by calculating a and b from the error obtain using gradient decent Error= Y - YP (YP = output gotten from random pick for a and b] This error is used to update our a and b by finding the rate at which a and b has contributed to the error i.e dE/db and dE/da Our new a and b for next testing will a=a + dE/da b=b + dE/db in order to speed up our findings we add step called learning rate n So new equation is a= a + n dE/da b=b + n dE/db we will continue updating still we find the real a and b that satisfy the equation. |
Programming / Let Learn Artificial Neutral Network by gbolly1151(m): 3:09am On May 20, 2020 |
In the last few weeks now,i embarked on ANN journey and it has been fun and exciting to learn. I will like to open this thread for people to drop what will be helpful for beginner as we journey in this ANN together. 1 Like |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:27pm On May 19, 2020 |
DanRay1:
Hope it is readable? 1 Like 1 Share |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:13pm On May 19, 2020 |
DanRay1:We are only required to input a number then it will print out all the collatz number still 1 1 Like |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 8:30pm On May 18, 2020 |
iCode2:Download think python |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:05pm On May 18, 2020 |
Predstan:Have you tried to run the code and it works as you expected? |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 5:04pm On May 18, 2020 |
Or there is something i don't get? |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 4:44pm On May 18, 2020 |
Predstan: That code for recursion doesn't look like one and even the first method will still end up looping and wont end. Am thinking should look like this
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 1:41pm On May 16, 2020 |
Predstan: Nice one bro...keep it up |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 11:07am On May 16, 2020 |
WHAT IS if __name__=='__main__'? #short explanation
then, you are telling the computer that if this python file is run by user or robot then print('hello') #full explanation Anytime you open python file,you are actually loading the file into the memory of the computer (i.e RAM). The name that will be given to that file at that point wont be the name of the file but a new name that is called '__main__' (i.e __name__='__main__') and it is stored together with other data in memory. To check that, open any python file and print global data using global keyword
from that output above we can see that __name__= '__main__' so at runtime the name of any python file is '__main__'. This name is often use proffessionally in python for testing or running the functionality of a script at runtime. you might be wondering why we have underscore,This is because we dont want it to be in conflict when we use 'name' as variable name in our program now,if you use
then, you are telling the computer that if this python file is run by user or robot then print('hello') you can acqually change the variable of __name__ e.g
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:13am On May 14, 2020 |
HOW TO USE all() KEYWORD all() in python is a keyword that take iterable object as aguement and return true only when all the elements in this iterable are true '''
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 3:02pm On May 11, 2020 |
Brukx:I haven't try building mobile app before so don't know the best book out there but you can search for kivy tutorial on Google the first index still look ok |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:30am On May 11, 2020 |
ALWAYS USE .startswith() AND .endwith() FOR SLICING OF STRING To aviod hardcoding of number into your code avoid the use of slicing in your code and to compliance with PEP8
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 4:51am On May 11, 2020 |
Antiausen:Thanks sir |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 4:50am On May 11, 2020 |
Hotspotbro:
Note that there is a documentation on how you can allow it to work on Andriod device Go to google and search for kviy tutorial pdf or video to see how to compile your kivy python file to work with android,there are 2 or 3 ways to do that,you can pick the anyone you can easily grab |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 3:17pm On May 10, 2020 |
Hotspotbro:To build android app with python use kivy |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 11:49am On May 10, 2020 |
Predstan:Nice one bro |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:43am On May 10, 2020 |
IF YOU ARE CONFUSED ABOUT WHILE LOOP CHECK THIS OUT n=True while n==True: print('hello') it means you are telling the computer that as long as n value isTrue(n=True) continue printing 'hello' for me Hope you can take it from there |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 8:07pm On May 09, 2020 |
gbolly1151:Alteratively, you can use vars() to get your key and data |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 16 pages)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 76 |