CCR (Corners of Circumscribing Coordinate Rectangle) (rnd-f, rnd-g, then lin-d) f=MinVecX≡(minXx1..minXxn) g≡MaxVecX≡(maxXx1..maxXxn), d≡(g-f)/|g-f| Sequence thru main diagonal pairs, {f, g} lexicographically. For each, create d. Notes: No calculation required to find f and g (assuming f1=MnVec RnGp>4 none start  g1=MxVec RnGp>4 Sub 0 7 vir18... Clus1 1 47 ver30 Sub 0 53 ver49.. Clus2 0 74 set14 SubClus1 Lin>4 none f2=0001 RnGp>4 none CCR-1. Do SpS((x-f)o(x-f)) round gap analysis CCR-2. Do SpS((x-g)o(x-g)) rnd gap analysis. CCR-3. Do SpS((xod)) linear gap analysis. SubCluster2 g2=1110 RnGp>4 none This ends SubClus2 = 47 setosa only Lin>4 none f1=0000 RnGp>4 none g1=1111 RnGp>4 none Lin>4 none f3=0010 RnGp>4 none f2=0001 RnGp>4 none g2=1110 RnGp>4 none Lin>4 none Lin>4 none f3=0010 RnGp>4 none g3=1101 RnGp>4 none Lin>4 none f4=0011 RnGp>4 none f4=0011 RnGp>4 none g4=1100 RnGp>4 none Lin>4 none f5=0100 RnGp>4 none g5=1011 RnGp>4 none Lin>4 none g3=1101 RnGp>4 none g4=1100 RnGp>4 none Lin>4 none f5=0100 RnGp>4 none g5=1011 RnGp>4 none Lin>4 none f6=0101 RnGp>4 none g6=1010 RnGp>4 none f6=0101 RnGp>4 1 19 set26 0 28 ver49 0 31 set42 0 31 ver8 0 32 set36 0 32 ver44 1 35 ver11 0 41 ver13 ver49 0.0 19.8 3.9 21.3 3.9 7.2 Lin>4 none f7=0110 RnGp>4 none g7=1001 RnGp>4 none Lin>4 none f8=0111 RnGp>4 none g8=1000 RnGp>4 none Lin>4 none f7=0110 RnGp>4 1 28 ver13 0 33 vir49 f8=0111 RnGp>4 none set42 ver8 19.8 3.9 0.0 21.6 21.6 0.0 10.4 23.9 21.8 1.4 23.8 4.6 set36 ver44 ver11 21.3 3.9 7.2 10.4 21.8 23.8 23.9 1.4 4.6 0.0 24.2 27.1 24.2 0.0 3.6 27.1 3.6 0.0 g6=1010 RnGp>4 none g7=1001 RnGp>4 none g8=1000 RnGp>4 none Lin>4 none Lin>4 none Lin>4 none MaxVecX and MinVecX have been calculated and residualized when PTreeSetX was captured.) 3. (and 2.?) may be unproductive in finding new subclusters (either because 1 finds almost all or because 2 and/or 3 find the same ones) and could be skipped (very likely if dimension is high, since the main diagonal corners are typically far from X, in a high dimensional vector space and thus the radii of a round gap is large and large radii rnd gaps are near linear, suggesting a will find all the subclusters that b and c would find. 2. good!, else setosa/versicolor+virginica are not separated! 3. is unproductive, suggesting productive to calculate 1., 2. but having done that, 3. will probably not be productive. Next consider only 3. to see if it is as productive as 1.+2. Subc2.1 ver49 ver8 ver44 ver11 CCR is as good as the combo (projection on d appears to be as accurate as the combination of square length of f and of g). This is probably because the round gaps (centered at the corners) are nearly linear by the time they get to the set X itself. To compare the time costs, we note: Combo (p-x)o(p-x) = pop + xox2xop = pop + k=1..nxk2 + k=1..n(-2pk)xk has n multiplications in the second term, n scalar multiplications and n additions in the third term. For both p=f and p=g, then, it takes 2n multiplications, 2n scalar multiplications and 2n additions. For CCR, xod = k=1..n(dk)xk involves n scalar mults and n additions. It appears to be cheaper (timewise) This ends SubClus1 = 95 ver and vir samples only
View full slide show




CCR(fgd) (Corners of Circumscribing Coordinate Rectangle) f1=minVecX≡(minXx1..minXxn) (0000) g1=MaxVecX≡(MaxXx1..MaxXxn) (1111), d=(g-f)/|g-f| Sequence thru main diagonal pairs, {f, g} lexicographically. For each, create d. f1=MnVec RnGp>4 none start  g1=MxVec RnGp>4 Sub 0 7 vir18... Clus1 1 47 ver30 Sub 0 53 ver49.. Clus2 0 74 set14 SubClus1 Lin>4 none f2=0001 RnGp>4 none CCR(f) Do SpS((x-f)o(x-f)) round gap analysis CCR(g) Do SpS((x-g)o(x-g)) round gap analysis. CCR(d) Do SpS((xod)) linear gap analysis. Notes: No calculation required to find f and g (assuming MaxVecX and minVecX have been calculated and residualized when PTreeSetX was captured.) SubCluster2 g2=1110 RnGp>4 none This ends SubClus2 = 47 setosa only Lin>4 none f1=0000 RnGp>4 none g1=1111 RnGp>4 none Lin>4 none f3=0010 RnGp>4 none f2=0001 RnGp>4 none g2=1110 RnGp>4 none Lin>4 none Lin>4 none f3=0010 RnGp>4 none g3=1101 RnGp>4 none Lin>4 none f4=0011 RnGp>4 none f4=0011 RnGp>4 none g4=1100 RnGp>4 none Lin>4 none f5=0100 RnGp>4 none g5=1011 RnGp>4 none Lin>4 none If the dimension is high, since the main diagonal corners are liekly far from X and thus the large radii make the round gaps nearly linear. g3=1101 RnGp>4 none g4=1100 RnGp>4 none Lin>4 none f5=0100 RnGp>4 none g5=1011 RnGp>4 none Lin>4 none f6=0101 RnGp>4 none g6=1010 RnGp>4 none f6=0101 RnGp>4 1 19 set26 0 28 ver49 0 31 set42 0 31 ver8 0 32 set36 0 32 ver44 1 35 ver11 0 41 ver13 ver49 0.0 19.8 3.9 21.3 3.9 7.2 Lin>4 none f7=0110 RnGp>4 none g7=1001 RnGp>4 none Lin>4 none f8=0111 RnGp>4 none f7=0110 RnGp>4 1 28 ver13 0 33 vir49 f8=0111 RnGp>4 none set42 ver8 19.8 3.9 0.0 21.6 21.6 0.0 10.4 23.9 21.8 1.4 23.8 4.6 g6=1010 RnGp>4 none g7=1001 RnGp>4 none g8=1000 RnGp>4 none g8=1000 RnGp>4 none Lin>4 none set36 ver44 ver11 21.3 3.9 7.2 10.4 21.8 23.8 23.9 1.4 4.6 0.0 24.2 27.1 24.2 0.0 3.6 27.1 3.6 0.0 This ends SubClus1 = 95 ver and vir samples only Lin>4 none Lin>4 none Lin>4 none Subc2.1 ver49 ver8 ver44 ver11
View full slide show




More Sort Names • Bubble sort · Cocktail sort · Odd-even sort · Comb sort · Gnome sort · Quicksort · Selection sort · Heapsort · Smoothsort · Cartesian tree sort · Tournament sort · Cycle sort · Insertion sort · Shell sort · Tree sort · Library sort · Patience sorting · Monkey-puzzle sort · Merge sort · Polyphase merge sort · Strand sort · American flag sort · Bead sort · Bucket sort · Burstsort · Counting sort · Pigeonhole sort · Proxmap sort · Radix sort · Flashsort · Bitonic sorter · Batcher odd-even mergesort · Timsort · Introsort · Spreadsort · UnShuffle sort · JSort · Spaghetti sort · Pancake sort
View full slide show




d3 Sub 0 Clus1 1 Sub 0 Clus2 0 10 19 30 69 set23...50set+vir39 set25 ver49...50ver_49vir vir19 d5 (f5=vir23, g5=set14) none f5 none g5 none d5 (f5=vir32, g5=set14) none f5 none g5 none d5 (f5=vir6, g5=set14) none f5 none g5 none (d1+d3)/sqr(2) clus1 none (d1+d3)/sqr(2) clus2: ver49 ver8 ver44 ver11 0 57.3 ver49 0.0 3.9 3.9 7.2 0 58.0 ver8 3.9 0.0 1.4 4.6 0 58.7 ver44 3.9 1.4 0.0 3.6 1 60.1 ver11 7.2 4.6 3.6 0.0 0 64.3 ver10 none (d3+d4)/sqr(2) clus1 none (d3+d4)/sqr(2) clus2 none (d1+d3+d4)/sqr(3) clus1 1 44.5 set19 0 55.4 vir39 (d1+d3+d4)/sqr(3) clus2 none (d1+d2+d3+d4)/sqr(4) clus1 (d1+d2+d3+d4)/sqr(4) clus2 none d5 (f5=vir19, g5=set14) none f5 1 0.0 vir19 clus2 0 4.1 vir23 g5 none d5 (f5=vir18, g5=set14) none f5 1 0.0 vir18 clus2 1 4.1 vir32 0 8.2 vir6 g5 none
View full slide show




Model Structure Tree Structure Specified for the Nested Logit Model Sample proportions are marginal, not conditional. Choices marked with * are excluded for the IIA test. ----------------+----------------+----------------+----------------+------+--Trunk (prop.)|Limb (prop.)|Branch (prop.)|Choice (prop.)|Weight|IIA ----------------+----------------+----------------+----------------+------+--Trunk{1} 1.00000|TRAVEL 1.00000|PRIVATE .55714|AIR .27619| 1.000| | | |CAR .28095| 1.000| | |PUBLIC .44286|TRAIN .30000| 1.000| | | |BUS .14286| 1.000| ----------------+----------------+----------------+----------------+------+--+---------------------------------------------------------------+ | Model Specification: Table entry is the attribute that | | multiplies the indicated parameter. | +--------+------+-----------------------------------------------+ | Choice |******| Parameter | | |Row 1| GC TTME INVT INVC A_AIR | | |Row 2| AIR_HIN1 A_TRAIN TRA_HIN3 A_BUS BUS_HIN4 | +--------+------+-----------------------------------------------+ |AIR | 1| GC TTME INVT INVC Constant | | | 2| HINC none none none none | |CAR | 1| GC TTME INVT INVC none | | | 2| none none none none none | |TRAIN | 1| GC TTME INVT INVC none | | | 2| none Constant HINC none none | |BUS | 1| GC TTME INVT INVC none | | | 2| none none none Constant HINC | +---------------------------------------------------------------+
View full slide show




in[] sort.grid even.odd even.odd even.odd even.odd even.odd even.odd even.odd even.odd Mar 18, 2019 Copyright P.H.Welch out[] 75
View full slide show




Entropyage (D)= 5/14 * -[0/5*log(0/5) + 5/5*log(5/5)] + 4/14 * -[2/4*log(2/4) + 2/4*log(2/4)] + 5/14 * -[3/5*log(3/5) + 2/5*log(2/5)] = .6324 bits Entropyincome (D)= 7/14 * -[2/7*log(2/7) + 5/7*log(5/7)] + 4/14 * -[2/4*log(2/4) + 2/4*log(2/4)] + 3/14 * -[1/3*log(1/3) + 2/3*log(2/3)] = .9140 bits Entropyveteran (D)= 3/14 * -[2/3*log(2/3) + 1/3*log(1/3)] + 11/14 * -[3/11*log(3/11) + 8/11*log(8/11)] = .8609 bits Entropycollege_educated (D)= 8/14 * -[6/8*log(6/8) + 2/8*log(2/8)] + 6/14 * -[3/6*log(3/6) + 3/6*log(3/6)] = .8921 bits
View full slide show




Task 2: Implement the following sorting algorithms: selection sort, insertion sort, quick sort and merge sort, and compare them by real running time Requirements • Find the running time as follows: check the current time t1; repeat the following steps 1000 times { randomly generate 10000 integers and save into array A; sort the integers in A using selection sort (or insertion sort, quick sort, merge sort); sort) } check the current time t2; running time of selection sort (or insertion sort, quick sort, merge sort) : = t2 – t1; • Implement the algorithms using C, C++, C#, or any other programming language. Submission Project description, Algorithms, Algorithm analysis, Experiment output, Code.
View full slide show




Logarithms • In algorithm analysis we often use the notation “log n” without specifying the base Binary logarithm lg n log 2 n Natural logarithm ln n log e n log k n (log n ) k log log n log(log n ) log x y  y log x log xy  log x  log y x log  log x  log y y log a x  log a b log b x CS 477/677 - Lecture 2 a logb x  x logb a 4
View full slide show




The Product Rule for Logs log 2 64 log 2 4  log 2 16 2  4 6 log 2 14 log 2 (2 7) log 2 2  log 2 7 1  log 2 7 log 100 x log 100  log x 2  log x log 5 125 yz log 5 125  log 5 y  log 5 z9.43  log 5 y  log 5 z 3
View full slide show




Theorem: log(n!)(nlogn) Case 1 nlogn  O(log(n!)) log(n!) = log(n*(n-1)*(n-2) * * * 3*2*1) = log(n*(n-1)*(n-2)**n/2*(n/2-1)* * 2*1 => log(n/2*n/2* * * n/2*1 *1*1* * * 1) = log(n/2)n/2 = n/2 log n/2  O(nlogn) Case 2 log(n!)  O(nlogn) log(n!) = logn + log(n-1) + log(n-2) + . . . Log(2) + log(1) < log n + log n + log n . . . + log n = nlogn
View full slide show




Theorem: log(n!)(nlogn) Case 1 nlogn  O(log(n!)) log(n!) = log(n*(n-1)*(n-2) * * * 3*2*1) = log(n*(n-1)*(n-2)**n/2*(n/2-1)* * 2*1 => log(n/2*n/2* * * n/2*1 *1*1* * * 1) = log(n/2)n/2 = n/2 log n/2  O(nlogn) Case 2 log(n!)  O(nlogn) log(n!) = logn + log(n-1) + log(n-2) + . . . Log(2) + log(1) < log n + log n + log n . . . + log n = nlogn
View full slide show




Why Deep Learning? Different Classifiers on the MNIST Database Linear classifier Pairwise linear classifier None Deskewing Error rate (%) 7.6[9] K-Nearest Neighbors K-NN with non-linear deformation (P2DHMDM) None Shiftable edges 0.52[18] Boosted Stumps Product of stumps on Haar features None Haar features 0.87[19] Non-linear classifier 40 PCA + quadratic classifier None Support vector machine Virtual SVM, deg-9 poly, 2pixel jittered None Neural network 2-layer 784-800-10 None None Neural network 2-layer 784-800-10 elastic distortions None 1.6[21] 0.7[21] Deep neural network 6-layer 784-2500-2000-15001000-500-10 elastic distortions None 0.35[22] Convolutional neural network 6-layer 784-40-80-500-10002000-10 None Expansion of the training data 0.31[15] Convolutional neural network 6-layer 784-50-100-500-100010-10 None Expansion of the training data 0.27[16] Convolutional neural network Committee of 35 CNNs, 1-20P-40-P-150-10 elastic distortions Width normalizations 0.23[8] Convolutional neural network Committee of 5 CNNs, 6-layer 784-50-100-500-1000-10-10 None Expansion of the training data 0.21[17] Distortion https://en.wikipedia.org/wiki/MNIST_database 9 Preprocessing None 3.3[9] 0.56[20] Deskewing P Classifier DE E Type
View full slide show




BEST Default Program Motor/Servo Port Joystick Channel Motor 2 (pair opposite of Motor 9) Motor Limits Positive Direction Negative Direction Stick 3 None None Motor 3 Stick 4 None None Motor 4 (pair opposite of Motor 7) Button 7 and 8 Up/Down/Left/Right None None Motor 5 Stick 1 Digital Input 1 Digital Input 2 Motor 6 Stick 2 Analog Input 1 Analog Input 1 Motor 7 (pair opposite of Motor 4) Button 7 and 8 Up/Down/Left/Right None None Motor 8 Button 6 Up None None Motor 9 (pair opposite of Motor 2) Stick 3 None None July, 2012 Copyright © 2012 BEST Robotics, Inc. All rights reserved. 28
View full slide show




• Collecting memory usage In onCreate, add – Context context = this.getApplicationContext(); – ActivityManager mgr = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE); – List processes = mgr.getRunningAppProcesses(); – Log.e("DEBUG", "Running processes:"); – for(Iterator i = processes.iterator(); i.hasNext(); ) – { • RunningAppProcessInfo p = (RunningAppProcessInfo)i.next(); • Log.e("DEBUG", " process name: "+p.processName); • Log.e("DEBUG", " pid: "+p.pid); // process id • int[] pids = new int[1]; • pids[0] = p.pid; • android.os.Debug.MemoryInfo[] MI = mgr.getProcessMemoryInfo(pids); • Log.e("memory"," dalvik private: " + MI[0].dalvikPrivateDirty); • Log.e("memory"," dalvik shared: " + MI[0].dalvikSharedDirty); • Log.e("memory"," dalvik pss: " + MI[0].dalvikPss); • Log.e("memory"," native private: " + MI[0].nativePrivateDirty); • Log.e("memory"," native shared: " + MI[0].nativeSharedDirty); • Log.e("memory"," native pss: " + MI[0].nativePss); • Log.e("memory"," other private: " + MI[0].otherPrivateDirty); • Log.e("memory"," other shared: " + MI[0].otherSharedDirty); • Log.e("memory"," other pss: " + MI[0].otherPss); • • • • • – run } Log.e("memory"," Log.e("memory"," Log.e("memory"," total private dirty memory (KB): " + MI[0].getTotalPrivateDirty()); total shared (KB): " + MI[0].getTotalSharedDirty()); total pss: " + MI[0].getTotalPss());
View full slide show




Redo Log Files • Purpose: - store changes made to the database as a result of transaction and internal Oracle activities. • Characteristics: 1. By default, an Oracle 10g database contains three redo log groups, REDO01.log, REDO02.log and REDO03.log 2. Every Oracle 10g database must have at least two redo log groups 3. The database will write log entries to a subsequent redo log group when the previous redo log group fills up 4. As a general rule , there should be one redo log group for approximately every four database users that create action queries 5. Oracle 10g keeps track of the Redo Log file by using a redo log sequence number, this number is recorded inside the file as they are used 6. The redo log sequence number is different than the operating system file name that is used to identify the physical file 7. If the database is in ARCHIVELOG mode full Redo Log files are copied to Archive Log files before they are reused, otherwise they are written over 8. Have a .log suffix CSE 781 – Database Management Systems 17
View full slide show




Katz Fractal Dimension Dimension = log(sum of lengths)/log(largest distance from the first point) double katz(double[] x) { int N = x.length; if (N<=1) return 0; • L = ∑ xi – xi-1 (sums adjacent lengths) • max, min = from first point • Katz normalizes log(L)/log(D)) to use log(L/d)/log(D/d) • Final formula double L=0, diff=0, D=0; for (int i=1; i D) D = diff; log(N-1) / (log(D/m) + log(N-1)) } • Notes double log = Math.log10(N-1); – N-1 because there are N-1 intervals return (d==0)?0:log/(Math.log10(d/L) with a signal of N points +log); – L / d = L / (L/(N-1)) = N-1 }
View full slide show




KATZ FRACTAL DIMENSION Dimension = log(sum of lengths)/log(largest distance from the first point) double katz(double[] x) { int N = x.length; if (N<=1) return 0; L = ∑ xi – xi-1 (sums adjacent lengths) • max, min = from first point double L=0, diff=0, D=0; • Katz normalizes log(L)/log(D)) to for (int i=1; i D) D = diff; log(N-1) / (log(D/m) + log(N-1)) } • Notes double log = Math.log10(N-1); – N-1 because there are N-1 intervals return (d==0)?0:log/ with a signal of N points (Math.log10(d/L)+log); – L / d = L / (L/(N-1)) = N-1 }
View full slide show