Sunday, December 25, 2011

Monday, December 19, 2011

ROC using perfcurve :

[X,Y,T,AUC] = perfcurve(labels,scores,posclass)

Perf curve returns points on ROC curve. To obtain more robust results using multiple iteration; labels and scores should be cell array containing multiple iteration labels. In this case it returns Mx3 matrix for X , Y , AUC , first column represents the mean value and others are bounds.

Wednesday, December 14, 2011

Kernighan's law:

Debugging is twice as hard as the code first place. Therefore , if you write the code as cleverly as possible , by definition not smart enough to debug it .

Friday, December 02, 2011

I wonder if we can represent irrational number using some finite primitive irrational numbers + rational numbers like in complex numbers (i is primitive).

Thursday, November 17, 2011

Is sun rotating around world or is world rotating around sun ?

It depends actually. Where did you define your origin ? Assume that I defined origin of universe as myself my position will be (0,0,0). So any rotation transformation will not change my position. It means all of the other object will turn around myself. Ofcourse it is intuitive to chose sun as origin in first sense , but it is not necessary , same transformations could be applied without chosing sun as an origin. There could be some standart system , than we can represent any position in universe by 3 coordinates. We can easily calculate using its distance and angle. That is actually what OPENGL is doing

Wednesday, November 09, 2011

Self Compacting DRAM:

Memory compaction is very expensive process. It is required to done in hardware. This case we can have assembly instruction that removes specified area in the memory. Than rest of the parts need to be shifted to empty portion. This requires shift by n circuit. If shift by n circuit could be done in cheap and fast way , we will not need any segmentation and page frames etc.

Tuesday, October 25, 2011

Eclipse Memory Problem:

When I am working on OpenGL project on Eclipse I faced a lot of problem due to memory. When javaw uses more than 256 mb it crashes and Eclipse shuts down immediately. When it is first opened it occupies 233 MB memory. There should be some configuration parameter to fix that. Does anyone knows it ?

This could be solution :
Weird Polygon Faces :

When I was translating my polygons in OpenGL , I realize that there is something wrong in my shape. It was due to depth configuration. I solved using :

glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

It took 1 day to understand what is the real problem.

Monday, October 17, 2011

Real Time Transcription:

In TV channels I realize that text is a little bit coming late after the speech. So , I think they are using employees to transcript the sound. A computer can do it very fast. But the problem is sound is very noisy , computer transcription could not be accurate enough. One way to solve that using human employees. But human should be very careful to transcript. It makes it slow. Better way could be using multiple human annotators and computer together. In this setting multiple human annotators provides multiple transcription than using learning from multiple experts methods speech could be transcribed into fast and accurate text. People not necessary to precise as previous scenario. It could be good application for my research.

Friday, October 14, 2011

Independent for loop :

Sometimes operations are taking too much time to complete. It will be good to divide for loop. But since we cannot know if previous iteration is necessary for later ones . Since the programmer may know : it is useful to define a new for loop type which is parallelizable. Than compiler will indicate that this for loop can be done in multi cores or multi machines. It may be keyword parallelizable in the language. Even this future may exist in Java.


Sunday, October 09, 2011

Java static syntax initialization :

static {
var= new Var();
}

Friday, October 07, 2011

Semi Multiplication :

Multiplication is summation in semi log scale. We can take the logarithm when we are optimizing multiplication of variables to convert optimization of summation of terms. It is possible to convert wise versa. Taking exponent of summation of terms we can convert multiplication of terms.
We can express exponantial function using taylor series. 1+x+x^2/2 ... . How about taking half of exponential function. where ,exp^-1() = log , exp^1 = exp , exp^0 = x ,exp^1/2 = semiexp().
So we can define a operator which is between summation (+) and multiplication(x) , this new operator (+x+) can be used in optimization as well.
I also need to emphasis summation and multiplication is and , or operation in logic. But there are some cases between and , or . This is similar to (+x+) operator.
Let me search a little bit.

Friday, September 30, 2011

If you need to cat array of cells horizontally :
cat(1,data{:})

Wednesday, September 28, 2011

3D pencil :

Another idea comes into my mind , using 2 color pencils could we create 3D pencil. Like in 3D cinema. You can wear glasses where one glass shows only green color and one shows red color. So Red and Greed pens will be stick together and the distance between two ink will be the function of depth (z). In this way people who watches the instructor will see the picture as 3D image. I have to show a picture to present better. It is later ...
Sorting objects according to their attribute (OOP) in MATLAB:

%Sort According to Slice location
[~ , ind ] = sort([dinfo.SliceLocation]);
dinfo = dinfo(ind);

Thursday, September 15, 2011

A web design system that I applied on my web page : AJAX + Google DOCS


In this web site , since I am updating my CV , contact etc information , I added google docs pages into right div. This way whole page is not required to be updated. But there are some funny features of this , I am able to open my web page again. But I think it is easier than updating and uploading file each time.

Wednesday, September 14, 2011

Fourier Machine:

When I am working on operating systems an idea come into my mind. We are using digital machines , especially von Neumann architecture. But human's are communicating with sounds , we can apply this for machines actually. Let represent sound 'a' with specified frequency for example 600 Hz. If we can store this frequency value in a memory we will be able to listen machine language. Than we can add or subtract two frequencies with using mixers , we can multiplex different circuits using analog multiplexers like in telephone line. This time our computer will be analog. We can ask this question do we need digital ? Digital may be easy but we can always make abstractions and make the interface easy. For example analog calculation core with digital interface is always possible. I am missing some points maybe, but it comes into my mind. We need analog frequency holder memories , multiplexers , mixers and may be ADC devices.

Friday, September 02, 2011

Fminunc

I presented fminsearch function , an alternative faster implementation of optimization function is fminunc(func,initial).

Here is an example from help :

x = fminunc(@(x) 5*x(1)^2 + x(2)^2,[5;1])

Friday, August 26, 2011

Su sekilde "Weighted covariance in MATLAB","Agirlilandirilmis kovaryans" problemini cozdum , yanlis bulan varsa soylesin :


sigma1 = ((data-repmat(mu1,N,1))'*diag(p))*(data-repmat(mu1,N,1))./sum(p)


p values are weights , data is consist of row vectors

Thursday, August 25, 2011

Matrix denkleminde minimum bulma ornegi

fminsearch(@(x)(x'*x),[1 ; 0 ])
MATLAB'da boyle bir hata aliyorsaniz


>> edit functions\test
??? Error using ==> edit at 57
Failed to open editor. Load of Java classes failed.



Su sekilde deneyin

edit .\functions\test

Gokhan Bilgin'e tesekkur ediyoruz.

AI

Despite the benefits of AI we are starving for humanity.