18 - AI Flashcards
dijkstras algorithm
- method of finding shortest path between 2 points on a graph
- based on cost between nodes
uses - GPS
dijkstras algorithm steps
- give the start index a value of 0
- give each vertex connected to the start a working value - if it already has one replace only if lower
- repeat until end vertex is reached and all vertexes are assigned a final value
- trace the route from the end to the start to find the shortest path
A* algorithm
- based on Dijkstra but adds a heuristic value (intelligent guess on how far we have to reach the destination directly)
- finds shortest path from start node to destination node
how to calculate heuristic
Manhattan method
- find the across and down distance
pythagorus method
- find the direct distance using pythag
applications of shortest path
- GPS
- google maps
- modelling spread of disease
- IP routing (packet switching)
AI
a machine with cognitive abilities eg problem solving and learning
split into:
- narrow
- general
- strong
narrow AI
when a machine has superior performance to a human in one specific task
general AI
when a machine has a similar performance to a human in any intellectual task
strong AI
when a machine has superior performance to a human in many tasks
examples of AI
- news generation based on live news feed
- smart home devices
machine learning
subset of AI
- algorithms are trained and learn from their past mistakes and examples
- is possible for the system to make predictions and even take decisions based on previous scenarios
- offer fast and accurate outcomes due to very powerful processing capability
- have ability to manage and analyse
considerable volumes of complex data (would take humans to long)
machine learning eg search engine
- user types criteria into engine which uses search bots to locate websites matching
- user choses one of the websites on page 1 (classed as a success since relevant pages are on 1)
- if user has to go to page 2, 3 or 4 (classed as failure since relevant pages not on 1)
unlabelled data
data which is unidentified and needs to be recognised.
Some processing would need to be done before it can be recognised asa specific group
types of machine learning
- supervised
- unsupervised
- reinforcement
- semi-supervised (active)
supervised learning
makes use of regression analysis and classification analysis - used to predict outcomes based on past data
- needs input + correct outputs to train
- uses labelled data so desired output is known
- once trained - run using labelled data
- results compared with correct output - if errors needs refinement
- once trained run with unlabelled data to predict the outcome
supervised learning eg
eg classifying emails as spam, identifying handwriting
unsupervised learning
- identify hidden patterns from input data
- not trained using right answer
- by making data more organised patterns become evident
(uses density estimation and k-mean clustering to do so) - evaluate the data to find any hidden patterns or structures within the data set
unsupervised learning eg
eg product marketing
- a group of individuals with similar purchasing behaviour are regarded as a single unit for promotions
reinforcement learning
- learns on reward and punishment - uses trial and error to determine which gives the optimal outcome
- increase the efficiency of the system by making use of optimisation techniques
reinforcement learning eg
search engines, online games, robotics
semi supervised learning
- makes use of labelled and unlabelled data to train algorithms that can interactively query the source data and produce the desired output
- makes use of as much unlabelled data as possible (cheaper)
- small amount of labelled data is used
semi supervised learning eg
classification of web pages
- a web crawler is used to look at large amounts of unlabelled web pages (cheaper than manually annotating them)
deep learning
subset of machine learning
structures algorithms in layers (input, hidden, output) to create and ANN that can learn and make intelligent decisions on its own
modelled on human brain
reasons for using deep learning
- identify patterns which would be too complex or time consuming for humans
- recognise objects and make them become labelled data which can be used to train new systems
- More precise and accurate - with more hidden layers
- Uses unstructured data
- Outperforms other methods if larger data size
artificial neural networks
- based on the human brain
- Weights assigned to connections between nodes
- Data input and passed into system
- Analysed at each subsequent hidden layer where characteristics are extracted
- Repeated to achieve optimum outputs
- labelled data is used to make sure response is correct if not refined using back propagation
reasons for multiple hidden layers
More layers means its weights are more fine-tuned - input nodes can be mapped more accurately to output nodes
uses of deep learning
text mining
computer assisted translation
photograph enhancement
turning monochrome to colour
chatbots
text mining
- text is translated into digital format
- then analysed
- machine learning used to determine book genre
computer assisted translation
- uses terminology database - linguistic databases that grow and ‘learn’ from translations being carried out
- uses translation memories - automatically insert known translations for certain words, phrases
photograph enhancement
deep learning trained by comparing smartphone and DSLR photos
photo is enhanced to DSLR quality by deep learning
large number of photographs already taken by a DSLR camera (but not by the
smartphone) are then used to test the model
turning monochrome photos into colour
deep learning can be used to give a very accurate coloured image
trained by searching websites for data which allows it to recognise features then map a colour to a photograph
chatbots
interact through instant messaging, artificially replacing patterns of human interaction using ML
typed messages or voice recordings make use of predefined scripts and ML
when a question is asked, a chatbot responds using the information known at the time
ML vs DL
- ML enables machine to make decisions based on past data - DL uses an ANN
- ML only needs a little data to train - DL needs lots
- ML identifies most features in data in advance - DL learns features of data from the data itself
- ML uses modular approach - DL solves as one entity
- ML takes long to test - DL testing is short
- ML has clear rules explaining why each models stage was made - DL makes decisions based in its own reasoning - hard to understand (black box)
future
AI - detection of crimes before they happen, development of humanoid AI to carry out human tasks
ML - increased efficiency of health diagnostics, better marketing
DL - increased personalisation in areas eg individual cancer care, hyper intelligent personal assistants
back propagation
- initially random weightings
- initial output compared with expected - weights adjusted to minimise difference
- calculus used to find error gradient in outputs - results fed back into ANN and weightings adjusted
- once errors in output eliminated the ANN is functioning correctly
- if errors still large repeated
types of back propagation
static
- maps static inputs to static input
- mapping is instantaneous
- training is easier
recurrent
- activation is fed forward until a fixed value is achieved
- not instantaneous mapping
- training is harder
regression
- way of analysing data before it is input into a system or model
- used to make predictions from given data by learning some relationship between the input and the output
- helps in the understanding
of how the value of a dependent variable changes when the values of independent variables are also changed - used in prediction eg weather forecasting
- in ML used to predict the outcome of an event based on any relationship between variables