Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC570 Lecture 07

CSC570 Lecture 07

Applied Affective Computing
Ensemble Methods
(202304)

Javier Gonzalez-Sanchez

April 23, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Research

Transcript

  1. jgs CSC 570 Current Topics in Computer Science Applied Affective

    Computing Lecture 07: Ensemble Methods Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
  2. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    3 Homework • Open or Closed Eyes VS. Brain • 5 diverse stimulation scenarios VS. Brain • 5 diverse stimulation scenarios VS. Affect Follow 2 approaches: a) Clustering as described today (EM, K-means, Density) b) Explore another solution to the best of your knowledge (Machine Learning, Data mining, Statistics) Due: Monday (April 24)
  3. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    4 Thoughts? Clustering was easy, What about something more precise for our data (such as a RandomForest) ?
  4. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    9 Example Which Attribute Should be the ROOT?
  5. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    10 Entropy Entropy is defined as the measurement of degree of randomness or in other words, it is the increase in the disorganization within a system.
  6. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    11 Gain Information gain is the reduction in entropy or surprise by transforming a dataset
  7. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    15 Evaluation (using 99% or 66% of training)
  8. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    22 Definition § Ensemble algorithms combine the predictions from multiple models.
  9. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    23 Random Forest § Random Forest is bagging for decision trees that can be used for classification or regression. § Decision trees are constructed using a greedy algorithm that selects the best split point at each step in the tree building process § Random Forest disrupts the greedy splitting algorithm during tree creation so that split points can only be selected from a random subset of the input attributes.
  10. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    25 Notes § Random forest classifier is only to be used when the data set is huge. If data set is not very huge the accuracy by Random forest classifier is less than accuracy by a normal single tree.
  11. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    26 How many Trees? § Default 10 § Suggest a number of trees between 64 - 128 trees.
  12. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    32 Lab 1 RandomForest for our CSV dataset with 5 categories (we have 20 files to combine in one dataset)
  13. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    34 How it Works https://connect.tobii.com/s/article/How-do-Tobii-eye-trackers-work
  14. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    36 Eye Timestamp GPX GPY Pupil Left Validity L Pupil Right Validity R Fixation Event AOI 101124162405582 636 199 2.759313 0 2.88406 0 48 Content 101124162405599 641 207 2.684893 0 2.855817 0 48 Content 101124162405615 659 211 2.624458 0 2.903861 0 48 Content 101124162405632 644 201 2.636186 0 2.916132 0 48 Content 101124162405649 644 213 2.690685 0 2.831013 0 48 Content 101124162405666 628 194 2.651784 0 2.869714 0 48 Content 101124162405682 614 177 2.829281 0 2.899828 0 48 Content 101124162405699 701 249 2.780344 0 2.907665 0 49 Content 101124162405716 906 341 2.853761 0 2.916398 0 49 Content 101124162405732 947 398 2.829427 0 2.889944 0 49 Content 101124162405749 941 400 2.826602 0 2.881179 0 49 Content 101124162405766 938 403 2.78699 0 2.87948 0 49 KeyPress Content 101124162405782 937 411 2.803387 0 2.821803 0 49 Content 101124162405799 934 397 2.819166 0 2.871547 0 49 Content 101124162405816 941 407 2.811687 0 2.817927 0 49 Content 101124162405832 946 405 2.857419 0 2.857427 0 49 Content 101124162405849 0 0 -1 4 -1 4 49 Content
  15. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    37 Eye 30 o 60 frames per second 30 o 60 inferences per second 1,800 o 3,600 values per minute 108,000 o 216, 000 values per hour
  16. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    39 Affect Recognition BCI and Gaze Points engagement
  17. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    40 Affect Recognition BCI and Gaze Points frustration
  18. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    41 Affect Recognition BCI and Gaze Points engagement
  19. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    42 Affect Recognition BCI and Gaze Points frustration
  20. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    45 § https://webgazer.cs.brown.edu § eye tracking library using common webcams to infer the eye-gaze locations of web visitors on a page in real-time. § written in JavaScript § can be integrated into a website § runs entirely in the client browser, so no video data needs to be sent to a server, and it requires the user's consent to access their webcam. WebGazer
  21. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    46 § https://github.com/brownhci/WebGazer/blob/master/www/calibration.html Callibration
  22. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    47 § asynchronous data store with a simple API § allows developers to store many types of data instead of just strings. localforage
  23. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    48 <html> <head> <script src="./webgazer.js"></script> </head> <body> <div style="text-align: right;" id="gazeData"></div> <script> webgazer.resume(); webgazer.setGazeListener(function(data, elapsedTime) { if (data != null) { var x = data.x; var y = data.y; document.getElementById("gazeData").innerHTML = "Gaze coordinates: x=" + x + ", y=" + y; } }).begin(); </script> <!-- work here … --> Template
  24. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    49 <!-- work here … --> <style> html, body {height: 100%;margin: 0; padding: 0; } table {width: 100%;height: 100%;border-collapse: collapse;} td {border: 1px solid black;} </style> <table> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> </tr> <tr> <td>Cell 4</td> <td>Cell 5</td> <td>Cell 6</td> </tr> <tr> <td>Cell 7</td> <td>Cell 8</td> <td>Cell 9</td> </tr> </table> </body> </html> Template
  25. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    51 Thoughts? For a Low-Cost, Low-Resolution approach, Could it be possible to After a while To cluster? What could be the result of doing that? Which approach could work better (K-mean, DBSCAN, EM)?
  26. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    52 Thoughts? How to connect this info with EEG? timestamp in JS? Save local data in JS?
  27. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    54 Office Hours Tuesday and Thursday 3 - 5 pm But an appointment required Sent me an email – [email protected]
  28. jgs CSC 570 Applied Affective Computing Javier Gonzalez-Sanchez, Ph.D. [email protected]

    Spring 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.