Friday, November 3, 2023

DataCamp classroom for my classroom :)

I want to give a shoutout to the DataCamp classroom team for their fantastic support in making my classes more engaging, all the way back to when I was teaching a Programming Languages course at Yeshiva University in 2020. I also suggested the use o DataCamp classroom for the ANMIGAs workshop this last summer at IPAM-UCLA. The participants worked on their programming background before the workshop started and it helped them jumpstart with the tutorials. I've shared this cool idea with my colleagues at City Tech, and it's working wonders. I suggested making a simple 4-hour certificate course a mandatory homework for our students to help them kickstart their Python programming skills. It's awesome to see that many of them are now using DataCamp in their classes. Students really enjoy it, and it's a great confidence booster. I often advise my students to share their DataCamp "Intro to Python" certificates on LinkedIn if they have an account. It's a fantastic way to get them ready for the job market! I also encourage them to complete the free 6-month DataCamp Data Science track certification. It's available for my classes for six months, which is a big help. I want to extend my heartfelt thanks to the DataCamp team for their assistance in resolving any issues we faced when setting up our online classroom. I'm planning to explore even more of their resources in my classroom regularly. Just to be clear, this isn't a sponsored post. I'm genuinely appreciative of how DataCamp has made teaching and learning more interactive and beneficial for my students.

Building little communities in the classroom

It's been a while since my last post, and we're well into the middle of the semester with more exciting math to explore in our classes. I wanted to kick things off by sharing a wonderful classroom moment from this week's group activity. It's fascinating how we can pick up valuable teaching tips from professional development workshops and see them make a big difference in our students' behavior and confidence. Let's dive into a typical Monday at 10 am in my precalculus class. We were diving into the world of polynomials, learning how to find their zeros, discover linear factors, and tackle polynomial factoring one step at a time. But here's where things got interesting: I decided to ask the students to count out loud and remember their numbers. Starting with "1," one student, the next one with "2," and so on until "7." We'd then restart the counting. The students with the same number became a group. This simple activity worked wonders in breaking the ice between students who hadn't interacted much throughout the semester. Let me take you to Group #7, which had three members: David, Angel, and Michelle. Right from the start, they were in deep discussion, checking calculations, and taking notes. When I approached them to ask about their progress, David gave a general answer but pointed out that Michelle had all the detailed calculations in her notebook. As time was running out, I asked if one of them wanted to tackle questions 1 and 2 on the whiteboard. With enthusiasm, they chose Michelle to take the stage. She confidently explained the procedure, I offered a few corrections, and the whole group was fully engaged. Members from other groups took turns at the whiteboard. I revisited Group #7 and asked if one of them wanted to tackle the final question on the board. Angel stepped up, and his teammates eagerly checked everything he wrote. Suddenly, Michelle rushed to the board to lend a hand and quietly corrected a mistake with her marker. At that moment, I exclaimed, "This is what teamwork is all about!" I expressed my desire to see more of this collaborative spirit in our class—students having each other's backs, helping one another learn and succeed. I encouraged the rest of the class to observe and learn from this heartwarming anecdote. This experience demonstrated how we can uplift each other as individuals. I shared this story with one of my mathematician friends, who felt that the term "empowering" is often overused and misused. However, she believed this anecdote was a perfect example of true empowerment. It was, without a doubt, the highlight of the week!

Thursday, September 21, 2023

Fall 2023: The first post of the semester

It's been a while since my last update, and I've had a busy summer filled with various enriching activities. I had the privilege of participating in an undergraduate workshop in Utah, where I shared my insights. Additionally, I was invited as a speaker at a Data Science workshop hosted by IPAM at UCLA, where I had the opportunity to deliver an engaging one-day tutorial. My summer also included a visit to my former PhD advisors in Oregon, during which we engaged in discussions about some truly exciting research. At present, I'm deeply engrossed in teaching precalculus and statistics with probability this semester. I must say, I'm genuinely thrilled about the progress my students are making and the lively interactions taking place within the classroom. It's become increasingly evident to me how crucial it is to establish open and honest communication with students to truly gauge their comprehension. In my precalculus class, we've delved into topics like absolute value inequalities, functions, and the transformations that can be applied to function graphs. Just recently, on Wednesday, 9/20, I assigned a class activity comprising six questions, expecting it to take no more than 30 minutes. Initially, my plan was to introduce my students to the various features of the TI-84 calculator. However, due to technical constraints (I didn't have the visual calculator installed), I decided to spend some time assessing their grasp of vertical and horizontal shifts. Specifically, we explored how to formulate functions after applying horizontal or vertical shifts, as well as stretching away from or compressing towards the y-axis. To my pleasant surprise, I witnessed several "aha" moments among my students, and I firmly believe that these breakthroughs are some of the most gratifying occurrences during class time. In the statistics with probability course, we've covered fundamental statistical concepts such as sample mean, median, variance, and more, along with the intricacies of box plots. I've also introduced a DataCamp classroom for this course, and I'm pleased to report that the students have successfully completed the introduction to Python course. Furthermore, they've become adept at creating Google Colab notebooks and tweaking Python code. They can do now a basic loop. They've worked extensively with the statistics library and pandas, they had fun importing CSV files into data frames and conducting basic data exploration. In the near future, we'll be delving into linear regression using the classic advertising data from the "Intro Statistical Learning" book by James et al. I've encouraged my students to proudly display their Intro Python certificates on their LinkedIn profiles, should they have one. All in all, I'm ecstatic about the commencement of the fall season!

Thursday, May 25, 2023

Some perspective for students on these times and how to reflect about life in the classroom

Sometimes when we think about teaching, we imagine this very serious professor on a podium or a blackboard dictating a very technical lesson. The professor is the only one speaking. If this is a math professor, he or she will only talk about math. Now in this era of multiple distrations and instant gratification, we need to go the extra mile and make students reflect about where are they going in life and if their habits are helping towards achieving their dreams. I mentioned to them that I read books in the subwway or the bus and do some grading or prepare the lesson of the day. The I asked them if they could count how many people in the wagon are looking at their cellphone: texting, playing a game, looking at some social media platform (the picture of someone eating pasta), etc. They smiled at me because they knew this is common. I did not want to sound like a broken record or that mom who is giving unsolicited advise. However, I suggested for them to take advantage of those moments of solitude to read a book, journal or reflect about an idea. We do not need to be making videos to gain approval from other people. Do it if you like but be careful with what is motivation behind it. I remembered sending and assignement where they had to take a picture of a proof of a proposition in the subway or other place outside campus or a classroom...a place where it is not common to see people writing proofs. I got pictures of people working on stairways in the city, a laundroamat, at the subway station while waiting for a train, the beach and during a subway ride. I hope this connected them with their own thoughts. At least they did not look at their cellphone screen for a few minutes :) We need independent thinkers, not that person who is competing in social media to post better pictures or catchy phrases than his/her friends. Dare to be different, it does not matter how you look, what is your financial situation, your life circumstances. Many things in life are ephemeral but your essence as a human being and as an intellectual is unique and can persist through time.

Algorithms, big-O and number theory

It has been a while since last time I published in this blog. Today I posted final grades and started to reflect about what we learn during the semester. We talked about big-O. We did an example where we found that a fucntion was O(x^2) by finding an upper bound for the orginal function when c is greater of equal for some real number k. We showed some plots to illistrate this point. We then moved to talked about module m atithmetic, reminders, Euclidean algoritm, etc. I was surpised to see that students really liked this part of the course. I wish I would have spent more time on it. We gave simple examples of how to ecrypt messages. Also, we showed propositions related to the greated common divisor between two numbers and how to find it using the Euclidean algorithm. Perhaps students will never forget about this french mathematician, Bezout (I'll add the tilda later.) With Bezout's identity, they can find the Bezout's coefficients of them is the inverse of one of the numbers involved in the greatest common divisor. Finding the inverse help us solve equations involvinf arithmetic module m. So every time we needed to find an inverse modul m, I would ask: "Do you remember the french name we need?" It makes me so happy to say "Bezout, Bezout!!!" at loud.

Tuesday, April 25, 2023

Sequences, series, Zeno's Paradox and Donald Duck

This week I am a little behind with my journaling. We had exam last week and this week we switched gears to discuss sequences and series. We started by stating that a sequence is a list of objects. It can be thought as the image of a map from natual numbers to a set S of objects. The set S can be made of numbers, characters, etc Some examples where discussed. Students figured out how to obtain the sequence from plugging in a general formula such as a(n)=1/n. We them moved to dicuss recurrence and did some examples with recurrent formulas and how to obtain the terms of the sequence using their previous values. Also obatined a general formular for the recurrence formulation examples. We then mentioned the famous Fibonacci sequence. Suddenly "Donald Duck in Mathmagic land" came to my mind and I juped to YouTotbe to search for an extract of the movie. I tried to look for the part where Donald plays with Fibonnacci numbers, but we ended up watching the part about the Pythagorians and how their mathematics "gave the basis of the music of today" Before moving to series, I stressed that we already discussed geometric series when we discussed mathematical induction. Anothe fun video came to my mind..the one from Ted Ed and the Zeno's Paradox This was provocative...Is the toatal time that Zeno takes to get to the tree finite or infinite? I asked: "Who thinks is infinite?" Just a few hands raised. They were amzazed...They made my day with their smiles when they saw that this was an example of a infinite series which reculting sum is a finite number (in this case, exactly 1.)

Friday, April 14, 2023

Cross Validation lecture for joint BYU-City Tech undergraduate data science seminar

 Today, I delivered a lecture on cross-validation and Bootstrap, which are resampling methods used to evaluate machine learning algorithms' test error. I based my lecture on a resampling chapter from Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani's book, "An Introduction to Statistical Learning: with Applications in R" (2013).

During the lecture, we first discussed the bias-variance trade-off and how the training error cannot accurately predict the testing error as the model's complexity increases. We then explored the performance of various ways of spltting the data, such as splitting the data into two equal parts and performing leave-one-out splitting.

Next, we discussed k-fold cross-validation, which involves splitting the data into K subsets of equal size, and iteratively selecting a validation set and training on the remaining folds K times. The cross-validation score is the weighted average of the mean squared error (MSE) for each fold. We demonstrated an experiment with 10-fold MSE and found that K=5 or 10 is a good compromise in terms of the variance-bias trade-off.

Finally, we discussed an example of two-class classification with 5000 predictors and 50 samples, where the wrong way to perform K-fold CV was to apply it after filter 1, while the right way was to apply CV on both filter 1 and filter 2. We stressed the importance of understanding the correlation between each K-fold split and the variance-bias trade-off in determining the optimal choice of K for the CV folds.

Overall, the lecture was well-received, and there were many interesting questions from colleagues and students. This is a topic that is frequently discussed in data science forums, and it is important to emphasize the importance of balancing the variance-bias trade-off and the impact of data splitting on the results of cross-validation.

Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani's book, "An Introduction to Statistical Learning: with Applications in R" (2013).




Swimming, Statistics, and the Normal Distribution

As we enter the final stretch of our accelerated summer statistics course, I find it hard to believe that there are only seven class mee...