These slides were designed for a talk at the IT-Meetup League of Geeks in Passau. It contains an introduction to the concept of TF and it's major improvements in version 2.0. Furthermore, basics about Machine and Deep Learning are explained. Finally, I explain how to do Computer Vision in TensorFlow 2.
The full talk can be found on YouTube: https://www.youtube.com/channel/UCycbEYf8CJSaAVCYgfMOAPQ
Code is on Github: https://github.com/sastemmler/leagueofgeeks
Understanding how high powered ML models arrive at their predictions is an important aspect of Machine Learning, and SHAP is a powerful tool that enables practitioners to understand how different features combine to help a model arrive at a prediction.
This slidedeck is from a presentation given at pydata global on the theoretical foundations of SHAP as well as how to use its library. Link to the presentation can be found here: https://pydata.org/global2021/schedule/presentation/3/behind-the-black-box-how-to-understand-any-ml-model-using-shap/
In machine learning, model selection is a bit more nuanced than simply picking the 'right' or 'wrong' algorithm. In practice, the workflow includes (1) selecting and/or engineering the smallest and most predictive feature set, (2) choosing a set of algorithms from a model family, and (3) tuning the algorithm hyperparameters to optimize performance. Recently, much of this workflow has been automated through grid search methods, standardized APIs, and GUI-based applications. In practice, however, human intuition and guidance can more effectively hone in on quality models than exhaustive search.
This talk presents a new open source Python library, Yellowbrick, which extends the Scikit-Learn API with a visual transfomer (visualizer) that can incorporate visualizations of the model selection process into pipelines and modeling workflow. Visualizers enable machine learning practitioners to visually interpret the model selection process, steer workflows toward more predictive models, and avoid common pitfalls and traps. For users, Yellowbrick can help evaluate the performance, stability, and predictive value of machine learning models, and assist in diagnosing problems throughout the machine learning workflow.
A typical programming task can be divided into two phases:
Problem-solving phase: produce an ordered sequence of steps that describe the solution of the problem this sequence of steps is called an algorithm.
Implementation phase: implement the program in some programming language.
Every algorithm must satisfy the following criteria:
Input. Zero or more quantities are externally supplied.
Output. At least one quantity is produced.
Definiteness. Each instruction must be clear and unambiguous(Unique meaning).
Finiteness. An algorithm terminates in a finite number of steps.
Effectiveness. Every instruction must be basic enough to be carried out than, means not so complex.
An algorithm is a finite set of steps defining the solution of a particular problem.
What is the difference between an algorithm and a program?
a program is an implementation of an algorithm to be run on a specific computer and operating system.
an algorithm is more abstract – it does not deal with machine-specific details – think of it as a method to solve a problem.
What is a good algorithm?
Efficient algorithms are good, we generally measure the efficiency of an algorithm based on:
Time: the algorithm should take minimum time to execute.
Space: the algorithm should use less memory.
DIFFERENCE BETWEEN ALGORITHM AND PSEUDOCODE?
An algorithm is a well-defined sequence of steps that provides a solution for a given problem, while pseudocode is one of the methods that can be used to represent an algorithm.
While algorithms can be written in natural language, pseudocode is written in a format that is closely related to high-level programming language structures.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages. Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages.
Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hakky St
This is the documentation of the study-meeting in lab.
Tha book title is "Hands-On Machine Learning with Scikit-Learn and TensorFlow" and this is the chapter 8.
These slides were designed for a talk at the IT-Meetup League of Geeks in Passau. It contains an introduction to the concept of TF and it's major improvements in version 2.0. Furthermore, basics about Machine and Deep Learning are explained. Finally, I explain how to do Computer Vision in TensorFlow 2.
The full talk can be found on YouTube: https://www.youtube.com/channel/UCycbEYf8CJSaAVCYgfMOAPQ
Code is on Github: https://github.com/sastemmler/leagueofgeeks
Understanding how high powered ML models arrive at their predictions is an important aspect of Machine Learning, and SHAP is a powerful tool that enables practitioners to understand how different features combine to help a model arrive at a prediction.
This slidedeck is from a presentation given at pydata global on the theoretical foundations of SHAP as well as how to use its library. Link to the presentation can be found here: https://pydata.org/global2021/schedule/presentation/3/behind-the-black-box-how-to-understand-any-ml-model-using-shap/
In machine learning, model selection is a bit more nuanced than simply picking the 'right' or 'wrong' algorithm. In practice, the workflow includes (1) selecting and/or engineering the smallest and most predictive feature set, (2) choosing a set of algorithms from a model family, and (3) tuning the algorithm hyperparameters to optimize performance. Recently, much of this workflow has been automated through grid search methods, standardized APIs, and GUI-based applications. In practice, however, human intuition and guidance can more effectively hone in on quality models than exhaustive search.
This talk presents a new open source Python library, Yellowbrick, which extends the Scikit-Learn API with a visual transfomer (visualizer) that can incorporate visualizations of the model selection process into pipelines and modeling workflow. Visualizers enable machine learning practitioners to visually interpret the model selection process, steer workflows toward more predictive models, and avoid common pitfalls and traps. For users, Yellowbrick can help evaluate the performance, stability, and predictive value of machine learning models, and assist in diagnosing problems throughout the machine learning workflow.
A typical programming task can be divided into two phases:
Problem-solving phase: produce an ordered sequence of steps that describe the solution of the problem this sequence of steps is called an algorithm.
Implementation phase: implement the program in some programming language.
Every algorithm must satisfy the following criteria:
Input. Zero or more quantities are externally supplied.
Output. At least one quantity is produced.
Definiteness. Each instruction must be clear and unambiguous(Unique meaning).
Finiteness. An algorithm terminates in a finite number of steps.
Effectiveness. Every instruction must be basic enough to be carried out than, means not so complex.
An algorithm is a finite set of steps defining the solution of a particular problem.
What is the difference between an algorithm and a program?
a program is an implementation of an algorithm to be run on a specific computer and operating system.
an algorithm is more abstract – it does not deal with machine-specific details – think of it as a method to solve a problem.
What is a good algorithm?
Efficient algorithms are good, we generally measure the efficiency of an algorithm based on:
Time: the algorithm should take minimum time to execute.
Space: the algorithm should use less memory.
DIFFERENCE BETWEEN ALGORITHM AND PSEUDOCODE?
An algorithm is a well-defined sequence of steps that provides a solution for a given problem, while pseudocode is one of the methods that can be used to represent an algorithm.
While algorithms can be written in natural language, pseudocode is written in a format that is closely related to high-level programming language structures.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages. Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages.
Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hakky St
This is the documentation of the study-meeting in lab.
Tha book title is "Hands-On Machine Learning with Scikit-Learn and TensorFlow" and this is the chapter 8.
Overview of TensorFlow For Natural Language Processingananth
TensorFlow open sourced recently by Google is one of the key frameworks that support development of deep learning architectures. In this slideset, part 1, we get started with a few basic primitives of TensorFlow. We will also discuss when and when not to use TensorFlow.
We live with an abundance of ML resources; from open source tools, to GPU workstations, to cloud-hosted autoML. What’s more, the lines between AI research and everyday ML have blurred; you can recreate a state-of-the-art model from arxiv papers at home. But can you afford to? In this talk, we explore ways to recession-proof your ML process without sacrificing on accuracy, explainability, or value.
Regression takes a group of random variables, thought to be predicting Y, and tries to find a mathematical relationship between them. This relationship is typically in the form of a straight line (linear regression) that best approximates all the individual data points.
Algorithm and C code related to data structureSelf-Employed
Everything lies inside an algorithm in the world of coding and algorithm formation which is the basis of data structure and manipulation of the algorithm in computer science and information technology which is ultimately used to find a particular problems solution
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Machine learning is improving facets of our lives as diverse as health screening, transportation and even our entertainment choices. It stands to reason that machine learning can also improve trading performance, however the practical application is fraught with pitfalls and obstacles that nullify the benefits and present a high barrier to entry. Building on background information and introductory material, Kris will propose a framework for efficient and robust experimentation with machine learning methods for algorithmic trading. The framework's objective is to arrive at parsimonious models whose positive past performance is unlikely to be due to chance. The framework is demonstrated via practical examples of various machine learning models for algorithmic trading.
Presentation in Vietnam Japan AI Community in 2019-05-26.
The presentation summarizes what I've learned about Regularization in Deep Learning.
Disclaimer: The presentation is given in a community event, so it wasn't thoroughly reviewed or revised.
The Power of Auto ML and How Does it WorkIvo Andreev
Automated ML is an approach to minimize the need of data science effort by enabling domain experts to build ML models without having deep knowledge of algorithms, mathematics or programming skills. The mechanism works by allowing end-users to simply provide data and the system automatically does the rest by determining approach to perform particular ML task. At first this may sound discouraging to those aiming to the “sexiest job of the 21st century” - the data scientists. However, Auto ML should be considered as democratization of ML, rather that automatic data science.
In this session we will talk about how Auto ML works, how is it implemented by Microsoft and how it could improve the productivity of even professional data scientists.
Overview of TensorFlow For Natural Language Processingananth
TensorFlow open sourced recently by Google is one of the key frameworks that support development of deep learning architectures. In this slideset, part 1, we get started with a few basic primitives of TensorFlow. We will also discuss when and when not to use TensorFlow.
We live with an abundance of ML resources; from open source tools, to GPU workstations, to cloud-hosted autoML. What’s more, the lines between AI research and everyday ML have blurred; you can recreate a state-of-the-art model from arxiv papers at home. But can you afford to? In this talk, we explore ways to recession-proof your ML process without sacrificing on accuracy, explainability, or value.
Regression takes a group of random variables, thought to be predicting Y, and tries to find a mathematical relationship between them. This relationship is typically in the form of a straight line (linear regression) that best approximates all the individual data points.
Algorithm and C code related to data structureSelf-Employed
Everything lies inside an algorithm in the world of coding and algorithm formation which is the basis of data structure and manipulation of the algorithm in computer science and information technology which is ultimately used to find a particular problems solution
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Machine learning is improving facets of our lives as diverse as health screening, transportation and even our entertainment choices. It stands to reason that machine learning can also improve trading performance, however the practical application is fraught with pitfalls and obstacles that nullify the benefits and present a high barrier to entry. Building on background information and introductory material, Kris will propose a framework for efficient and robust experimentation with machine learning methods for algorithmic trading. The framework's objective is to arrive at parsimonious models whose positive past performance is unlikely to be due to chance. The framework is demonstrated via practical examples of various machine learning models for algorithmic trading.
Presentation in Vietnam Japan AI Community in 2019-05-26.
The presentation summarizes what I've learned about Regularization in Deep Learning.
Disclaimer: The presentation is given in a community event, so it wasn't thoroughly reviewed or revised.
The Power of Auto ML and How Does it WorkIvo Andreev
Automated ML is an approach to minimize the need of data science effort by enabling domain experts to build ML models without having deep knowledge of algorithms, mathematics or programming skills. The mechanism works by allowing end-users to simply provide data and the system automatically does the rest by determining approach to perform particular ML task. At first this may sound discouraging to those aiming to the “sexiest job of the 21st century” - the data scientists. However, Auto ML should be considered as democratization of ML, rather that automatic data science.
In this session we will talk about how Auto ML works, how is it implemented by Microsoft and how it could improve the productivity of even professional data scientists.
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...Maninda Edirisooriya
Bias and Variance are the deepest concepts in ML which drives the decision making of a ML project. Regularization is a solution for the high variance problem. This was one of the lectures of a full course I taught in University of Moratuwa, Sri Lanka on 2023 second half of the year.
Practical deep learning for computer visionEran Shlomo
This is the presentation given in TLV DLD 2017. In this presentation we walk through the planning and implemintation of deeplearning solution for image recognition, with focus on the data.
It is based on the work we do at dataloop.ai and its customers.
This is a slide deck from a presentation, that my colleague Shirin Glander (https://www.slideshare.net/ShirinGlander/) and I did together. As we created our respective parts of the presentation on our own, it is quite easy to figure out who did which part of the presentation as the two slide decks look quite different ... :)
For the sake of simplicity and completeness, I just copied the two slide decks together. As I did the "surrounding" part, I added Shirin's part at the place when she took over and then added my concluding slides at the end. Well, I'm sure, you will figure it out easily ... ;)
The presentation was intended to be an introduction to deep learning (DL) for people who are new to the topic. It starts with some DL success stories as motivation. Then a quick classification and a bit of history follows before the "how" part starts.
The first part of the "how" is some theory of DL, to demystify the topic and explain and connect some of the most important terms on the one hand, but also to give an idea of the broadness of the topic on the other hand.
After that the second part dives deeper into the question how to actually implement DL networks. This part starts with coding it all on your own and then moves on to less coding step by step, depending on where you want to start.
The presentation ends with some pitfalls and challenges that you should have in mind if you want to dive deeper into DL - plus the invitation to become part of it.
As always the voice track of the presentation is missing. I hope that the slides are of some use for you, though.
This is a slide deck from a presentation, that my colleague Uwe Friedrichsen (https://www.slideshare.net/ufried/) and I did together. As we created our respective parts of the presentation on our own, it is quite easy to figure out who did which part of the presentation as the two slide decks look quite different ... :)
For the sake of simplicity and completeness, Uwe copied the two slide decks together. As he did the "surrounding" part, he added my part at the place where I took over and then added concluding slides at the end. Well, I'm sure, you will figure it out easily ... ;)
The presentation was intended to be an introduction to deep learning (DL) for people who are new to the topic. It starts with some DL success stories as motivation. Then a quick classification and a bit of history follows before the "how" part starts.
The first part of the "how" is some theory of DL, to demystify the topic and explain and connect some of the most important terms on the one hand, but also to give an idea of the broadness of the topic on the other hand.
After that the second part dives deeper into the question how to actually implement DL networks. This part starts with coding it all on your own and then moves on to less coding step by step, depending on where you want to start.
The presentation ends with some pitfalls and challenges that you should have in mind if you want to dive deeper into DL - plus the invitation to become part of it.
As always the voice track of the presentation is missing. I hope that the slides are of some use for you, though.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
2. Outline
• Introduction to Machine Learning
• Framing: Key ML Terminology
• Descending into ML
• Reducing Loss
• First Steps with TF
3. Introduction to Machine
Learning
• Reduce time programming
• feed machine learning tool some examples, and get a more
reliable program in a small fraction of the time.
• Customize and scale products
• To support multiple languages, you can collect data in that
language and feeding it into the exact same machine learning
model.
• Complete seemingly "unprogrammable" tasks
• ML lets you solve problems that you, as a programmer, have no
idea how to do by hand, ex. recognize face
4. Introduction to Machine
Learning
• Coding
• We use assertions to prove properties of our program
are correct.
• ML
• The focus shifts from a mathematical science to a
natural science:
• We're making observations about an uncertain world,
running experiments, and using statistics, not logic, to
analyze the results of the experiment.
5. Framing: Key ML
Terminology
• Label
• A label is the thing we're predicting—the y variable in
simple linear regression.
• already has an answer
• Feature
• A feature is an input variable — the x variable in simple
linear regression.
• Parameter types of data we already have
6. Framing: Key ML
Terminology
• Example
• An example is a particular instance of data, x. (We put x in boldface to
indicate that it is a vector.)
• labeled examples
• {features, label}: (x, y)
• train the model
• unlabeled examples
• {features, ?}: (x, ?)
• we want to predict
8. Descending into ML
• Linear Regression
• find the closest linear relationship (prediction)
between x and y
• prediction could be defined as
9. Descending into ML
• - Loss
• a number indicating how bad the model's prediction was on a
single example
10. Descending into ML
• Loss Function
• Squared Loss (L2 loss)
• = the square of the difference between the label and the
prediction
•
•
• Mean Square Error (MSE)
• sum up all the L2 loss, and then divide by the number of examples
13. Reducing Loss
• An iterative trial-and-error approach to training a model
• start with an initial guess for the weights and bias
• iteratively adjusting those guesses
• until learning the weights and bias with the lowest
possible loss
• overall loss stops changing or at least changes
extremely slowly
• called the model has converged
16. Reducing Loss
• Gradient descent
• find a learning rate (a hyperparameter) large enough that gradient
descent converges efficiently, but not so large that it never converges
18. Reducing Loss
• batch
• the total number of examples you use to calculate the
gradient in a single iteration.
• small: computing ↓ noisy ↑; large: computing ↑ noisy ↓
• Stochastic gradient descent (SGD):one example (a
batch size of 1) per iteration
• Mini-batch stochastic gradient descent (mini-batch
SGD):10 and 1,000 examples
21. First Steps with TensorFlow
• Pandas
• deal with examples (input data, x) before being
put into TensorFlow
• data structure
• DataFrame - like examples, has 1↑ Series
• Series - like features,
22. First Steps with TensorFlow
• TensorFlow
• Build the First Model
• Tweak the Model Hyperparameters
23. First Steps with TensorFlow
• Build the First Model
• Define and Configure Feature
• Define the Target (y)
• Configure the LinearRegressor
• Define the Input Function
• Train the Model
• Evaluate the Model
24. First Steps with TensorFlow
• Define and Configure Feature
• Configure data type for TF’s feature column
• Categorical Data
• Numerical Data
26. First Steps with TensorFlow
• Configure the LinearRegressor
• apply gradient clipping via clip_gradients_by_norm
• ensures the magnitude of the gradients do not
become too large during training, which can cause
gradient descent to fail.
27. First Steps with TensorFlow
• Define the Input Function
• instructs TensorFlow how to preprocess the data, as well as
how to batch, shuffle, and repeat it during model training.
• convert our pandas feature data into a dict of NumPy
arrays.
• use the TensorFlow Dataset API to construct a dataset
object
• break data into batches of batch_size, to be repeated for
the specified number of epochs (num_epochs).
29. First Steps with TensorFlow
• Train the Model
• call train() on our linear_regressor to train the model.
30. First Steps with TensorFlow
• Evaluate the Model
• compare max, min, mean value to Root Mean Squared
Error (RMSE)
31. First Steps with TensorFlow
• Tweak the Model Hyperparameters
• learning_rate, steps, batch_size, input_feature
• tips
• Lower learning rate
• Larger number of steps or batch size