3. Statistics of columns/features – how does it
help?
• Describes the range of different features
• Understand the range of feature the machine learning algorithm trained
with
• Variation within features
• Standard deviation indicates the variation of data within the range
9. Kaggle datasets
• Mobile price prediction
• Fish Weight Prediction
• Heights and Weights
• Student performance prediction
• Predict Airline Passenger Satisfaction
10. Pandas dataframe to dictionary conversion
• Upload the mood dataset file to your repl program. Link
11. Pandas dataframe to dictionary conversion
• Import a csv file and execute the code below
12. Pandas dataframe to dictionary conversion
• What is the datatype of records_array variable?
13. Pandas dataframe to dictionary conversion
• What is the datatype of each entry of the records_array
variable?
14. Exercise
• Retrieve the 10th row of the dataset mood_project_3.csv in the
dictionary format.
15. Requests module in python
• This module helps you to send HTTP requests in python
• What are HTTP requests?
16. Requests module in python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
17. Requests module in python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
url: The http url to send request to
data: String containing the payload (features in case of AI)
18. Requests module in python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
Example:
data: {“Sentence”: “I am sad”}
19. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
20. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
21. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
22. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
23. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
24. Lets connect your AI with python
• Copy paste the code into your repl account
• Note that the code is a function, you have to call this function to get
the prediction
json.dumps() converts
dictionary to striing
Convert the output you
receive into readable format
25. Lets connect your AI with python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
• Upload the mood dataset into repl
26. Exercise
• Convert the mood dataset rows into dictionaries
• Trigger the AI service
• Calculate accuracy across all samples of the dataset
• Calculate the confusion matrix