0%

Learning is dangerous; Not learning is lethal.

Why learning is dangerous? Because when are learning you have to change–habits, beliefs,knowledge,actions and so on, every change may let you sit in an uncomfortable place unsure of the following consequence.

But not learning is lethal. Because the world change in every minutes, even every seconds, if you act the same way as before, you will be very likely lost your job, get a stroke and worry about your food and Pension.

What to do then?

Learn with a teacher, learn with your friends and learn in your own feasible and effective ways. Of course you have to study how learning happen to you at first.

Today I went to MLC to attend a lecture by Dr Michelle Smith. In front of MLC, I saw a strange thing. You can see the picture below.
hungeru

The fact and statistics is printed on it. Food still occupy a large percentage(39.8%) in their total household spend. In Congo, 70% goes to food, it means people there are more likely in hunger.

I asked where is the data from? They told me they gathered these data last Saturday, and the survey is still going on.

How can I participate? I asked. Just let people know this fact and then we can change this fact and statistic. Isn’t it a good idea? College students may not give money directly, but they can collect data and spread the fact all over the world.

Although the program is funded by Farm Journal Foundation, I guess volunteer college students played a role in the Survey and HungerU Tour in different countries. This is the responsibility that our college students are able to and should shoulder.

Today I updated ubuntu, and then I can’t start it any more. It show tyy1 login. In fact I met this problem several times before, I know it is caused by the graphic driver update. I have to reinstall the right driver. But I forget where is the driver file and how to setup it.

I tried many times and finially I got it back to normal. The solving process:
#login with your username and password
cd Downloads # where my dirver is
sudo sh amd-driver-64.run
setup it (always select the first selection and ok)
#restart

I have copied the driver in the folder dirver. so next time I can found it more easily.

The problem I have to solve:

  1. How to stop the update for the graphic driver?
  2. How to recover my ubuntu quickly?

Learning to use a new language is not easy. Learning to use all the shortcut keys of TMUX and VI also takes time.

Today, I want to record what I had learnt about TMUX and Vi.

While, I should divided this post into two posts, but TMUX only takes a little ink, so I just put it here.

TMUX is a tool to help you divide your screen of your terminals into several screens. Whenever you want to use hotkeys, you have to press Ctrl + B first, then you can press the hot key. You can change the pre hot key, but I just leave it unchanged. The most used keys are the following:
REMEMBER to press Ctrl+B first!!
% #divide screen left and right
“ #divede screen up and down
Ctrl + Down #make the down screen smaller
exit #cancel present screen
n #new dash window

That is it.

Then let me record the tips of VI. Well it is much complex than the former. Generally, it has three mode, i mode(insert and edit), v mode(copy and paste), and : mode(file operation). Ok let me write down the most used keys:
Ctrl +: #this will let you enter the file operation mode
i #this will let you enter the edit mode, Press Esc to enter : mode
v #this will let you enter copy and paste mode, Press Esc to enter : mode

When you press ‘v’ in the : mode, you can press Arrow Button to select the text you want to copy or delete, and then press:
y #copy
d #delete
p #paste
Ctrl+: #show clipped board
:%s/ski/sky/g #replace ski with sky in all place

How to save file
:w filename
:w! filename
:wq #quit and save
:q! #quit not save

How to open file
:open filename
:open ~/luke/code/try.py

How to search in a file
:/ pattern
:? pattern
n:search next
N:search previous

How to cancel and redo
:u for cancel
Ctrl + R:redo

How to paste from system clipboard
shift+insert
+p

Isn’t easy. But it takes time to get used to them and operate unconsioucely.

I also want to keep down some hot keys of Ubuntu, let me google first. Ok here are they:
Ctrl + Alt + L lock the desktop
Win applications desktop
Ctrl + Alt + Left shift to left desktop
Alt + Tab shitt applications
Alt + F4 shut down present application
Ctrl+Win+Up Maxilize present window
Ctrl+Win+Down Minilize presnet window
Ctrl+Alt+T Open terminal
$ command1 && command2 # execute command1 first and succeed then execute command2
Ctrl+Shift+Arrow Shift Workplace
Ctrl+Shift+Alt+Arrow move present window to Workplace

Want to know more, click here
Now almost done, and wait to be expanded.

Sometimes when something becomes your job, even you love it, when you have to do if before a deadline, you tend to lose the fun you had before.

Something you don’t have to do it, but you are interested and want to try. You are more likely to do better and have a lot of fun.

As a teacher, how do you apply this rule to your teaching?

Is it the reason why teacher drop out in their early career?

How to let teachers have fun in their teaching?

How to let students have fun in their learning?

Why people have fun in doing something? The following is a list of “something” can offer:

  1. Provide new/pleasant experience
    People are born with curiosity, and love to have new experience. They like to do the thing they have never done before or doing the same thing but in new ways.
  2. Engage emotion
    Passion, curiosity, sense of acheivement even superiority are all emotions letting people have fun. So if the design can engage these emotions, then it becomes hot.
  3. Match their habits and mindset
    They don’t need to take much effort in order to operate or understand. It is user friendly designed.
  4. Meet various needs
  5. Be simple and neat

Recently I joined NG’ class of Machine Learning

Summay of the main topics:

Suprevised Learning

linear regression
通过已有数据,估算线性函数的参数,然后通过自变量X估测因变量y的值。例如在拥有交易数据的情况下,通过房子本身的具体参数预测其市场价格。其中y是连续变量。当仅仅利用原始数据不能给出很好的预测时,可以考虑扩展X,比如原始变量只有x1, x2,扩张后可以包含x1, x2, x1*x2, x1^2 ,x2^2, 这样就可以克服bias的可能性。

logistic regression
当y是二分变量时,比如根据肿瘤的形状估测其是否为恶性肿瘤。这个时候就要使用logistic regression了。思路与linear regression一样,当目标是做出真假的判断。实现的方法是利用logistic curve做变换,转变为linear regression。

neural networks
模拟神经元的作用模式,设置隐藏层,通过估算中间参数来达到预测的目的。

SVM
向量机适用于自变量X不是特比多时,如果有上万个自变量,那么这个时候SVM会很困难。向量机的核函数可以有多种选择,可以是线性的,也可以是gaussain kernel等。

Unsupervised Learning

K-means
聚类分析

PCA
主成分分析

Anomaly detection
异常识别

Special applications/topics

Recommender systems
例如根据用户对影片的评价,向用户推荐合适的影片。这种情景需要循环估算影片参数和用户参数,进而给出合适的推荐。

large scale machine learning
通过算法上技巧将巨型运算分解,如分解到多个计算机,或者分解为多个步骤的小运算。

Advice on building a machine learning system

Bias/variance
参考Ng的两张幻灯片。
high bias
high variance

regularization
通过regularizations参数(如C值,lamda等)的控制,达到既不bias,也不overfit的目的。

deciding what to work on next
从简单开始,不断评估,逐渐优化,寻求正解。

evaluation of learning algorithms

learning curves

error analysis
I类错误:假阴性,明明是,结果预测说不是。
II类错误:假阳性,明明不是,结果预测说是。
Precision=truePositive/(truePositive+falsePositive)
Recall=truePositive/(truePositive+falseNegtive)
F score=2PR/(P+R)
通过F值可以在两者之间得到平衡,F值越大两者兼顾越好。

ceiling analysis

picture notes: G:\myfile\img\machinelearning

Octave basics

Octave

Here is the Basic Commands from Ng’s class notes


PS1('>> '); % make pre short  
1==2 %false  
1~=2  
1 && 2 % AND  
1 || 0 % OR  
xor(1,0) % OR
a=3; % semicolon supressing output  
b='hi';  
disp(sprintf('2 decimals: %0.2f',a))  
a=pi;  
format long  
format short  
A=[1 2; 3 4; 5 6]  
ones(3,1)  
zeros(1,3)  
rand(1,3)  
hist(-6+sqrt(10)*(randn(1,10000)))  
size(A,1)  
save hello.txt v -ascii % save as text  
eye(6)  
length(A)  
load featuresX.dat  
load priceY.dat  
load('featuresX.dat')  
who  
clear priceY  
clear  
v=priceY(1:10)  
A(3,1)  
A(2,:) % ":" means every element along that row/column  
A([1 3],:) % get 1,3 row  
A(:,2)=[10;11;12]  
A=[A,[100;101;102]]  
A(:) % put all elements into a single vector  
C=[A B]  
C=[A; B]  
sum(A)  
prod(A)  
floor(A)  
ceil(A)  
max(A,[],1)  
max(A,[],2)  
max(A)  
flipud(eye(9))  
t=[0:0.01:0.98]  
y1=sin(2*pi*4*t);
y2=cos(2*pi*4*t);  
plot(t,y1);  
plot(t,y2,'r')  
xlabel('time')  
ylabel('value')  
legent('sin','cos')  
title('my plot')  
print -dpng 'myPlot.png'  
close  
figure(1);plot(t,y1);  
figure(2);plot(t,y2);  
subplot(1,2,1); % divides plot a 1x2 grid, acce  
axis([0.5 1 -1 1]) & x [0.5 1] y[-1 1]  
clf;
imagesc(A)  
imagesc(A), colorbar, colormap gray;  

indices=1:10;  
for i=indices,
   disp(i);
end;  

i=1;  
while i <=5;  
  v(i)=100;  
  i=i+1;  
end;  

i=1;  
while true,  
  v(i)=999;  
  i=i+1;  
  if i==6,  
    break;  
  end;  
end;  

v(1)=2;  
if v(1)==1,  
  disp('equal one')  
elseif v(1)==2,  
  disp('equal two')  
else  
  disp('not one or two')  
end;  

pwd  
ls  

addpath('C:users\ang\Desktop') % add octave search path  

mlclass-ex4-004 and mlclass-ex4-003 can be used in Application Example: Photo OCR

Yesterday, I attended Dr Jackson’ class ESCI 8990 Daily Page.

We discussed questions:

  1. whether scientific knowledge is a private product?
  2. whether is it right to use grants to apply patent or develop products for profits?
  3. conflicts between patent protection and equal access to scientific knowledge.

I didn’t say a word because I was the only Chinese around the table and intellectual property protection in China has a bad reputation although the situation is improving. I don’t want to defend too much, but I guess everyone may only have one story about the IPP in China. But just as Chimamanda Ngozi Adichie said: There is a danger of a single story. So it will always be good to know more than one story.

The idea of patent protection became popular in industry culture. In order to encourage people and companies to develop more new type of products for society goodness, we give them such protects and advantages in using the patent that they invented first.

But, in agricultural civilization, such as accent China, there is no such idea. Some people may keep their special way of making food or drinks as their secrets, but once the secrets were known by others, they can also make the same food and drinks, and it is legal. The government may also help to publish and transmit some technologies, such as paper making and the printing. If they apply for the patent of making paper and printing, how much money they can earn? But this may also slow down the development of human society. So every patent has limited period for protection. The patent finally becomes common property of human society.

In agricultural civilization, labor is the main value source of a product. Yes, patent tell how to make a product, but it is the labor make it realized. This is not true in industrial civilization, the people or company who possess the patent earn the most of the profit. You will never know how cheap labor become in China nowadays. Is it equal? Is it a new kind of colonization? Many developed country put their factories into developing countries, they use their labor, resources and make wastes and pollution. Is it fair? Is it sustainable? Will it leads to wars? You can read more about Ecojustice.

Well, industrialization and consumerism are both come from western culture. Human rights is also declared in the western. But there is conflicts between commercialization of science and education equity. The following paragraph is from:The Universal Declaration of Human Rights

Article 26.
(1) Everyone has the right to education. Education shall be free, at least in the elementary and fundamental stages. Elementary education shall be compulsory. Technical and professional education shall be made generally available and higher education shall be equally accessible to all on the basis of merit.

Poor people receive poor education and they remain poor, becomes a circle. This will only lead to hate and war. Patent protection can help develop new products and technologies and promote the progress of society. It can also benefit some people and groups and hurt the others. Especially, when the researchers use grants(money from citizens) to do research and apply for patents only benefit for a special organization or people. Then it is unfair.

It is also disputable whether something should be a patent. For example, the people invent the product later by his own, will lost all the value of his effort because it would be illegal to for him to use the same way to make product.

The company own the patent seems own a new kind of capital – Intellectual Capitalism. Government tend to protect their patent rights in order to encourage more company to do research and development. But sometimes it will lead to monopolization and the price of their products becomes unreasonable(several times higher than its actual cost). Will government still protect?

With the global industrial production, with consumerism and commercialization, will this new kind of capitalism – Intellectual Capitalism create a new colonial history. Do we want this happen? Or it already happened.

There should be a balance between patent protection and common benefit, between efficiency and fairness, between developed and developing countries, between industrial civilization and agricultural civilization, between human and nature, otherwise we are making troubles and potential dangers for ourselves!

On the other hand, science education sits in an uncomfortable place in this landscape given particular aspects of patenting and property rights imply limited access and thus inequity in knowledge acquisition.

iphone

克隆文化
有性繁殖与无性繁殖

It is uncomfortable to work on my laptop on a table. Becuase the screen is too low and you have to bend your head which cause pain in the neck.
So I made a laptop stand using a useless shoes box. Here is the picture.
laptop stand

You can alway make a change if you want to. And small change can make a big difference sometimes.

Yesterday, a TED talk at TEDxStanford moved me deeply. It was given by Rhodes Scholar Rachel Kolb – who was born deaf. She showed what is possible through family support and self-belief, and proves that what is assumed about you and what you can actually achieve don’t always match up. In the United States, two-thirds of hearing-impaired people do not complete high school.

阅读全文 »

It is so hard to descibe how teacher develop related knowledge to teach a special topic.

I have come up with many analogies to assit my thinking and modeling of teacher knowledge development.

Here is another wonderful analogy Rock Climbing. The following is a picture:
rock climbing
More about Rock climbing
The teacher developed lots of intermediate representations (just like the cracks, faces, slabs in rock climbing) to help students learning the scientific concept.

Good teacher can “see” the postions of students and can “arise” the right representation to help. The subject matter knowledge is the moutain. The “safety rope” is the good teacher-student relationship which keep the safe environment for learning. The routes can be fun and the goal can be challenging. They all motivates student to climb and learn.