I Love Math – And It Makes Me Glad

I love the game of Go, I love golf, I love my wife, I love teaching, and I love math – and this makes me glad.

Eight years ago, I ended that sentence with the word, “sad.”  Eight years of minor and not so minor health problems. Eight years of increasingly ill golf buddies and relatives. Eight years of friends and relatives passed.  I have the sense that I am intently clinging to those activities and those people who give me the most pleasure. Now I marvel at those few new ideas that enter my brain.  I am paying closer attention to my friends, my students and my wife and sometimes reel in amazement at their creativity, their humor and their courage. I am still looking forward and striving to improve, though now there is a sense of impending limitation and fear of not finishing my small projects. So, I’m glad and grateful that I can still play and think and enjoy other’s company.  As you can see, I am no longer measuring or judging my performance. I am intentionally and self-consciously paying attention. I love living on the Earth in an Earth-designed body with an Earth-responsive brain and it makes me glad.

Advertisements
Posted in Rants | Leave a comment

Machine Learning – So, Explain Yourself

We humans are not giving up without a fight. Though computers are clearly outthinking us, see AlphaGo for example, we aren’t listening.  Cynthia Rudin, my latest hero, describes the issue in this video. Humans need reasons. In the paper, A Bayesian Framework for Learning Rule Sets for Interpretable Classification. Journal of Machine Learning Research (JMLR), 2017 Tong Wang, Cynthia Rudin, Finale Doshi, Yimin Liu, Erica Klampfl, and Perry MacNeille,  she and her researchers devised a machine learning method that provides compact understandable rules that define specified success. This post is a report on my experiments with the accompanying program that was posted here on github.

I first used their tic-tac-toe example to get all the Python parts running. The output, as I found out, was a set of rules defining what a win looked like. Then I decided to see if the method could generate the rules of the game of  Set in the same way. Set is played with a deck of cards. Each card has a symbol or symbols having four characteristics – number, shape, color, and fill type, each with three different possibilities. A set is three cards that have either all different or all the same possibilities for all four characteristics. To make the resulting rules from the program a little easier to understand, I chose to do the simulation with just three characteristics called a, b and c with three possibilities 0, 1 or 2 for each.

After messing around with random deals for a while, I found that the proportion (4%) of natural hits was too low for the program to handle. In my struggle, since nothing seemed to be working, I had added logical summaries to the input data columns. In essence, I preprocessed the information. Each deal of three cards was now accompanied by six columns describing whether each of the characteristics were all the same or all different. This felt like cheating. Since I had known what I was looking for, I set up columns that summarized those exact traits. For a while, I experimented with just this summary information. I had started by using all permutations of the deals, then changed to just all combinations since the program did just as well without the redundancy. The four percent success rate was not enough for the program to learn the distinctions so I turned the problem on its head and defined hits as non-sets. This lead to a succinct set of rules arrived at quickly. There were the three rules for non-Sets, to quote, “(‘cAllDifferent_neg’, ‘cAllSame_neg’) (‘aAllDifferent_neg’, ‘aAllSame_neg’) (‘bAllDifferent_neg’, ‘bAllSame_neg’)”. This translates as characteristic c can’t have all different traits and characteristic c can’t have all the same traits or  characteristic a can’t have all different traits and characteristic a can’t have all the same traits or characteristic b can’t have all different traits and characteristic b can’t have all the same traits. This is exactly how a human might describe the game of Set’s rules. Next I added columns for the specific characteristics on each card. The program properly ignored the more detailed information and reverted to the summary information since they gave a more compact set of rules. Finally, I eliminated the summary rules. The list of rules was longer than it needed to be and had evident overlap. It was tricky to parse, i.e., explain to myself. Anyway my learning curve has flattened out. Now I want to explore real data. This is in the works.

What have I learned? 1) The method of assigning added negation columns saves time and gives fewer, shorter rules. 2) Looking for rules that define non-hits is sometimes more efficient. 3) It is sometimes useful to preprocess the data into partial summary logical new columns. 4) Using someone else’s program without a understanding every line leaves a residue of uncertainty.

Also, a shout out to the Jupyter notebook system which made working with Python much easier and more organized. This type of notebook is particularly useful for the kind of casual experimenting that I did. Each time, I copied portions of the program’s run results and pasted them with some comments into a new HTML cell as documentation. The result was a crude narrative which I drew on for the above.

Posted in Cool Ideas, Math Explorations | Tagged | Leave a comment

Science Problems with an Apology

I added these two problems to the Precalculus homework list as part of my effort to incorporate science examples in my classes.

Science Problems for Precalculus

Science Problems for Precalculus

They were taken from solutions to some physics exercises and intended to give more practice on multi-variable systems. Afterwards I shared a copy with our science people accompanied by an apology. I had stripped the problems of meaning. They just sit there lifeless, without any scientific justification or reasoning. Our students will still benefit from seeing problems that are closer, if only in notation, to the ones they will see in their science courses. Anyway, if you think about it, the problems are least one level above the algebra abstraction where all variables are x and y.
I just got an email from our physics professor. He asked me to reword the first problem to emphasize that the tangent of theta is a function of several variables. What a good idea. This is a point of view that we introduce too late in mathematical curricula. I can’t wait to discuss this stuff with my students tomorrow.

Posted in Curriculum, Teaching | Tagged | Leave a comment

An Optimization Excursion

A student, Emily Wimmer, walked into my office.  She was trying to make sense of an optimization algorithm.  We worked it out and off she went to write a MATLAB program to test the algorithm on a well-behaved function. Of course, just as a mathematician instinctively looks for an counterexample to “break” a proof, I started to imagine a function that would be hard to optimize, in this case,  a prototypical hilly landscape with lots of local optima.  My idea was to use slightly perturbed Chebyshev polynomials over a restricted domain.  With a little tweaking, I had my hilly terrain.

The function is specified in this python code.

# Hilly Landscape Function

def T10X(x):
x = x +.2
y = -(512*x**10-1300*x**8+1120*x**6-400*x**4+50*x**2-1)+1*x**12+.4
return y

def T10Y(x):
x=x-.1
y = (512*x**10-1285*x**8+1120*x**6-400*x**4+50*x**2-1)-1*x**12 – .2
return y

def func2dplot(x,y):
f = -T10X(x)*T10Y(y)
return f

In the course of this investigation I found these images of awesomely weird functions and learned about python’s scipy library of optimization methods.  I tried one of them, “basinhopping,” on my function.  Hence the garish ball locating the “optimum” on the graph above.  It is evidently not the global maximum.  Thus I “broke” that particular optimization method.

All this was an excursion in the middle of excursions.  I was working on a machine learning application.  Then Emily came in with an interesting problem.  Before I could think through that problem, a biology professor had a question about curve-fitting survival curves.  I got that one lined out, then returned to the optimization.  Now I can get back to my machine learning application but who knows what other interesting problem will walk through the door.

By the way, the Jupyter system of interspersing python code and HTML has been highly useful for all these types of explorations. Recommended.

Posted in Cool Ideas, Math Explorations | Tagged | Leave a comment

Teaching Choices

Last week we had a few sixth graders visit our elementary algebra classroom.  While my students were taking their daily quiz, I put this on the board for the youngsters.  I went to the back of the room and explained the question. I  put 2D Boxcar on the screen for those that didn’t want to think about the problem.  Fairly soon I got the answer (Done without paper and pencil b-t-w).  So I changed the problem to 

This was a choice.  When I talk to individual youngsters about math, I try to build an argument.  For example, to show that multiplying by eight is easy, I might ask this series of questions.

In the example above, I wasn’t going for the basic structure.  If so, I would have asked them to solve

next.  Instead I asked for the solution to

 

thinking that they would have to perturb the previous answer (and use fractions) or maybe try adding the right sides and dividing by two.  My next problem would have been

Most of this was done unconsciously since I was handing out papers and tending to other aspects of class management.

Posted in Classroom Happenings, Pedagogy, Teaching | Tagged | Leave a comment

A Good Test …

It is finals time and I am daydreaming.

A good test

  • has students emulating reasoning patterns.
  • has students supplying reasons for steps.
  • has students grabbing the best tool for the job.
  • has students display what they learned doing their homework.
  • has students combining, not concatenating, concepts.
Posted in Pedagogy, Teaching | Tagged | Leave a comment

Intellectual Load – The Student Experience

“Intellectual load” as applied to website design refers to the  extraneous thinking and decision-making caused by poorly organized, inconsistent web page layout and functionality. I would like to apply this concept to the college student experience.  I  extend the definition of intellectual load to include the totality of decisions, problem solving, and just plain searching per some unit time required of students by their university and I will assume that a student has a limited capacity for dealing with this load.  Thus,  the minimization of unnecessary intellectual demands is an important  goal – important because we are likely to retain more students and because it is the humane thing to do.

On a first level, having effective websites and transparent simple procedures for registering for classes, changing classes, paying bills, etc. would reduce a student’s intellectual load and save them time – time that would be better spent studying.  This is a known problem, often unaddressed.  Just check any random universities website with a specific question in mind.

The second level, entails the intellectual load imposed by varying academic standards across campus.  Often students have to think through what is acceptable in different courses – typed or handwritten, polished or rough, spelled correctly or who knows, all steps shown or the important ones or none.  One gets the sense that students sometimes are just testing for the particular course’s standards or worst, disregarding said standards – still a choice. If the faculty, even by department, spoke as one voice, students’ intellectual load, and for that matter stress, would decrease.

There is a third level that I am exploring this term.  I  teach college algebra to a cohort of students that are taking both introductory biology and chemistry.  I have reordered my curriculum so that I am going over the math that I know they will be using at the same time in their labs and on their exams.  For instance, teaching straight line math early, using significant digits and decimal calculations early and consistently, and making up examples that come directly from their labs using the same units.  If one thinks about it, most math students in precalculus and higher will not be math majors but will be STEM majors.  This sharing of common problems among the disciplines can only help reduce a college student’s intellectual load.  Looking over biology and chemistry labs and seeing  the keys for their exams have given me good examples and changed the way I discuss issues in class.  No longer just “You will see this technique in calculus class” but “The behavior of this graph will be important in your spectrometer lab”.  I now know, even, that mixture problems in algebra II are much more important than the usually phrased motion applications.

I also see the glimmer of a fourth  level.  Thinking as such is not usually taught on campus, at least,  in the sense of Thinking  in Bets by Annie Duke and How to Think by Alan Jacobs.  These thinking skills and sensibilities apply to all disciplines and also to life.  Using their structure to teach introductory critical thinking and problem solving in all programs would reduce a student’s intellectual load.  We know that skills often don’t transfer across disciplines but they might if we work at it.

Posted in Curriculum, Pedagogy, Rants, Teaching | Tagged , | Leave a comment