----------------------------------------------- 17 December 2012: from TCH ----------------------------------------------- CS6350 grades are posted. ----------------------------------------------- 15 December 2012: from TCH ----------------------------------------------- CS5350 grades are posted. ----------------------------------------------- 13 December 2012: from TCH ----------------------------------------------- CS 6350: If you need more time for the Final Project paper, you can turn it in through Friday 5pm. ----------------------------------------------- 3 December 2012: from TCH ----------------------------------------------- We now have donated python code for RL; it's in code/A7/python ----------------------------------------------- 2 December 2012: from TCH ----------------------------------------------- Also got some input on learning rate and discount factor that seem to work for symmetry: 0.05 learning rate; 0.95 discount factor. Error in symmetry approach: The s_sym_index is the index of the symmetric state of the current state - not the next state (I used s_prime in the previous comments). Here is how it is found: x_sym_index = CS5350_val2ind(-s(1),x_min,x_max,num_x); x_dot_sym_index = CS5350_val2ind(-s(2),x_dot_min,x_dot_max,... num_x_dot); theta_sym_index = CS5350_val2ind(-s(3),theta_min,theta_max,... num_theta); theta_dot_sym_index = CS5350_val2ind(-s(4),theta_dot_min,... theta_dot_max,num_theta_dot); s_sym_index = sub2ind(size_Q,x_sym_index,x_dot_sym_index,theta_sym_index,... theta_dot_sym_index); ----------------------------------------------- 27 November 2012: from TCH ----------------------------------------------- To work on the symmetry question: You need to modify CS5350_CP (around lines 101-102); instead of just updating Q(s_index,a), you need to update the symmetric state, too: Q(s_sym_index,other_a) = Q(s_index,a); other_a is 2 if a is 1, and 1 if a is 2. s_sym_index is the index of the symmetric state. Here is how it is found: x_sym_index = CS5350_val2ind(-s_prime(1),x_min,x_max,num_x); x_dot_sym_index = CS5350_val2ind(-s_prime(2),x_dot_min,x_dot_max,... num_x_dot); theta_sym_index = CS5350_val2ind(-s_prime(3),theta_min,theta_max,... num_theta); theta_dot_sym_index = CS5350_val2ind(-s_prime(4),theta_dot_min,... theta_dot_max,num_theta_dot); s_sym_index = sub2ind(size_Q,x_index,x_dot_index,theta_index,... theta_dot_index); ----------------------------------------------- 27 November 2012: from TCH ----------------------------------------------- There will be no class on Thursday 29 November! ----------------------------------------------- 25 November 2012: from TCH ----------------------------------------------- A paper has been put in the Link to Course Info and Documentation btg-pailisn-04.pdf which describes the problem defining the A8 assignment. ----------------------------------------------- 25 November 2012: from TCH ----------------------------------------------- Assignment A7 has been changed from an image processing problem to the cart pole problem. A set of Matlab functions CS5350_CP* have been placed in the code/A7 subdir. Please read the new assignment A7 document. Also, there is a document in the Link to Course Info and Documentation describing the cart pole problem (05_cart_pole.pdf). ----------------------------------------------- 18 November 2012: from TCH ----------------------------------------------- A bug was found in CS5350_GA_DT which may cause it to not produce monotonically increasing best cases. If you are able to switch functions at this point (!!) the following two functions are available in code/A6: CS5350_GA_DT2 CS5350_GA_DT_next_gen2 which are to replace the corresponding current functions. ----------------------------------------------- 8 November 2012: from TCH ----------------------------------------------- Tuesday 13 November: Guest Lecture by: Jur ven den Berg on Reinforcement Learning Thursday 15 November: No class (work on A6!) ----------------------------------------------- 1 November 2012: from TCH & Anshul ----------------------------------------------- Somebody asked Anshul this question on Tuesday: "How do I know which features to ignore (in the original data set X), after using eigs()? Since eigs() returns the eigenvectors already sorted based on the eigenvalues" So I looked it up and it's as simple as rotating the original data using the sorted eigenvectors. I'm sure many people will ask this question next week. So here is a useful link to the answer to that question: http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf On page 16, "Step 5:Deriving the new data set", it is given precisely how to do that calculation. Just in case you want to mention that in class. ----------------------------------------------- 22 October 2012: from TCH & student ----------------------------------------------- Another report you may want to take note of, if you have a problem. in the Python code I also had to change two lines in CS5350_choose_samples(X,Y,w,SAMPLE_PERCENT): X_t[s,:] = X[index,:] Y_t[s] = Y[index] to X_t[s,:] = X[index-1,:] Y_t[s] = Y[index-1] ----------------------------------------------- 21 October 2012: from TCH ----------------------------------------------- 1. I have added a function in the code/A4 subdir: CS5350_Adaboost_image_features which computes a histogram of edge orientations in the letters, and adds that to the decision tree features. This seems to produce very low error rates (down to 0 by a small number of classifiers). 2. Another problem was reported (I did not run into it in my testing): I'm sorry to bother you again but I have found a real bug in CS5350_Adaboost_recall.m. Specifically it extracts the number of classes from the h struct as follows BEGIN CODE ############## num_classes = length(h(1).C.Prob_C) END CODE ############## However it appears that this isn't always correct. I have replaced that line with the following code to fix the problem. BEGIN CODE ############## num_classes = 0; for i = 1:length(h) num_classes = max(num_classes, length(h(i).C.Prob_C)); end END CODE ############## ----------------------------------------------- 20 October 2012: from TCH & student ----------------------------------------------- A student reported a bug in the Python code; if you have trouble, try the following: I have altered the python implementation of CS5350_value_to_bin such that it returns the same output as the matlab version given the same input (see below). Would you please ask the original author whether they have made any other bug fixes? def value_to_bin(val,bins): # value_to_bin - convert feature value to histogram bin index # On input: # val (feature value - int, float): original feature space value # bins (1xn vector): upper bin limits # On output: # b (int): bin index, starting at 0 # Call: # b = value_to_bin(X(1,:),H.X_bins.Fb) if len(bins) == 0: return 0 num_bins = len(bins) if num_bins == 1: return 0 if val < bins[0]: return 0 if val >= bins[num_bins-1]: return num_bins-1 for b in range(1,num_bins): if val < bins[b]: return b return 0 ----------------------------------------------- 19 October 2012: from TCH ----------------------------------------------- There is now contributed Python code for Adaboost and Bayes classifier: Adaboost.txt can be found on code/A4 subdir. ----------------------------------------------- 18 October 2012: from TCH ----------------------------------------------- For CS6350: There is a P3 assignment in the syllabus that describes the due dates for the set of reports to be submitted on the status of the research projects. The Adaboost code had a slight change (in the bin part), so you should replace any old version. ----------------------------------------------- 3 October 2012: from TCH (& Mustafa!) ----------------------------------------------- Mustafa has contributed a tree dump vis code; it is now in the code subdir. I modified your tree dumping method so that it can output .dot files for DOTTY, a graphical visualization tool. I think it would be useful for everyone, and I don't mind other people using it. I've attached the method and a sample output [TCH: now in code subdir as AI_dum_tree_dotty.m and decision_tree_pixels_smaller.png], made by opening the .dot in ZGRViewer, exporting an SVG, opening that in Inkscape, and then exporting it as a PNG. ----------------------------------------------- 29 September 2012: from TCH ----------------------------------------------- I found some problems with the multi-class decision tree, and I think they are fixed now. The best is to get rid of all old code and start with what is now in code/A3. What you need to do, is: - split the data into training and testing sets (e.g., 9 of them using the i_th example of each letter as the testing set - get the features from the images and encode in sample matrix X and target vector Y (in the new A3, see CS5320_DT_image_features where I compute 5 features; these produce error of about 7.8%) - build the decision tree - use CS5350_tree_decide on each test sample to measure the results I now have a working character classification code using decision trees. ----------------------------------------------- 27 September 2012: from TCH ----------------------------------------------- All assignments (A3, etc. and P1a, P2, etc.) must be handed in as hardcopy by start of class on the due date, as well as sent in by handin. If you were asked to REDO P1, the deadline is 4 Oct at class time. ----------------------------------------------- 26 September 2012: from TCH ----------------------------------------------- A4 is now available. I have put a (very good!) solution to A2 in the solutions subdir (called A2_solution.pdf). The original image with the characters is now in the data subdir, and is called chars2.tif. The Adaboost code is available in the code subdir in subdir A4. ----------------------------------------------- 23 September 2012: from TCH ----------------------------------------------- I noticed that the decision tree code that I put in the code subdir only worked for binary decisions; I have now modified it to handle multiple classes. Also, for A3, you only need to compare RBF networks and decision trees. Do not compare MLP with these. ----------------------------------------------- 19 September 2012: from TCH ----------------------------------------------- I have changed the threshold in CS5350_error_RBF.m from: 0.5 to: 0.51 and this gives more accurate results. You might also want to try producing y_s vector with a 1 in the position with the max response in the y (output) vector. ----------------------------------------------- 14 September 2012: from TCH ----------------------------------------------- In looking at the scanned notes which describe how to compare the performance of 2 learning methods, I noticed that on page ML\25, Step 2 says for i = i to K whereas it should be: for i = 1 to K ----------------------------------------------- 12 September 2012: from TCH ----------------------------------------------- The RBF train function used the form G\yn but this seems to not be very robust, so I switched it to pinv(G)*yn. ----------------------------------------------- 11 September 2012: from TCH ----------------------------------------------- The class lecture Matlab code from 4-6 September is now on the code subdir. Anshul will have the graded A1's ready to return today (during office hours). This first assignment will allow us to calibrate, and two grades have been given: (1) Grade for the assignment (the higher of the two), and (2) grade the workwould ordinarily receive. I will discuss issues when I return, and Anshul will have a few observations this Thursday. ----------------------------------------------- 10 September 2012: from TCH ----------------------------------------------- A description of the grading criteria for A1 is given as CS5350\ A1\ Grading.pdf in the Link to Course Info and Documentation. The lecture Tuesday will be given by Tom Fletcher and will cover Support Vector machines. Thursday, Anshul will discuss the grading of A1, as well as give the quiz. ----------------------------------------------- 8 September 2012: from TCH ----------------------------------------------- While grading the A1 reports, I noticed that several people followed my example and called Section 4 'Method' (it should be the Data section). Please remember to consult the Lab Report Format for the final word on what goes in a report. ----------------------------------------------- 6 September 2012: from a student ----------------------------------------------- Here is a link to RSS feed for the announcements page. It automatically sends out feeds each time page is updated and easy to add to any email client. http://page2rss.com/rss/d70aaf2fe4ccc64ead148608d6874fc9 ----------------------------------------------- 6 September 2012: from TCH ----------------------------------------------- Don't forget: Assignment is due by class time today, and no late assignments are accepted. The cs5350 Sympa mailing list is now available and announcements will be posted here and sent there. ----------------------------------------------- 5 September 2012: from TCH ----------------------------------------------- CS6350: There is no cs6350 on the CADE, so all assignments are to be handin to cs5350. ----------------------------------------------- 4 September 2012: from TCH ----------------------------------------------- The CS6350 Project Proposal is now due 20 September, 2012. A sample proposal is given in the: Link to Course Info and Documentation Your proposals may not be as far along in terms of knowing the method or showing them in images, but should closely follow the format and have the essentials (references, thesis, method, problem, performance analysis framework, and schedule). ----------------------------------------------- 1 September 2012: from TCH ----------------------------------------------- For CS6350, please use handin to submit the project proposal to cs5350 P1 (i.e., handin cs5350 P1 proposal.pdf). ----------------------------------------------- 31 August 2012: from TCH ----------------------------------------------- I have moved the demo code to code/A1 and it should run when the following line is executed (assuming the data files are in the path): >> [f,X,t,X_tr,t_tr,X_te,t_te,nodes,trace] = CS5350_demo_MLP(3,1000); Also, in CS5350_AI_backprop.m, at the end of the code, I commented out a line and added 3 lines in front of it: [max_val,max_index] = max(y); y = zeros(y_dim,1); y(max_index) = 1; % y = y>=0.5; If you have any trouble, one thing to do is to comment out the 3 lines and un-comment the commented line. The new lines seemed to help the character classifiaction problem, but they are not the algorithm. ----------------------------------------------- 30 August 2012: from TCH ----------------------------------------------- The TA is currrently located in WEB 2673, and office hours are 2-3pm TH. I have added a Matlab function CS5350_NN_standard_ims which takes the data images and produces a set of standardized 30x20 images. ----------------------------------------------- 29 August 2012: from TCH ----------------------------------------------- I have added a Matlab function named CS5350_demo_MLP to the code directory. It shows how to use the data and functions I have supplied to train an MLP. ----------------------------------------------- 25 August 2012: from Dustin Webb: ----------------------------------------------- I have worked through all but two of the examples from chapter 2 and all of the examples from chapter 3 using the code from the textbook. It appears to work just fine. However on CADE machiens it is important to note that there are several versions of python installed. To use a particular version one executes python where is the version of interest. Furthermore there is a 32 bit binary and 64 bit binary installed for most versions. For the 64 bit binaries a period is used to separate the major and minor version numbers. So for example "python26" executes the 32 bit python v2.6 binary. Conversely "python2.6" executes the 64 bit python v2.6 binary. I was only able to get the examples working with the python2.6 binary. The others were missing essential libraries such as numpy. On Ubuntu 11.10 and Mac OSX Lion no special action is required. ----------------------------------------------- 25 August 2012: from TCH ----------------------------------------------- 1. A Matlab version of MLP code has been put in the code subdir 2. An example report has been put in the solutions subdir