Right click on the project, under* New *choose *others*, then go to *C/C++* folder, inside it there is an option: *Convert to a C/C++ Project*, click on it

# Monthly Archives: March 2013

# Camera preview failed

Solution:

Inside SurfaceView Holder, make sure to set the type to SURFACE_TYPE_PUSH_BUFFERS

```
@Override
public void onCreate(Bundle savedInstanceState) {
// ...
SurfaceView sur=(SurfaceView)findViewById(R.id.surface);
SurfaceHolder holder =sur.getHolder();
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
```

# Neuron Network in Java

# Bayesian network structure learning (2)

Question: does not know the structure of the Bayesian Network and missing data

Back up: if structure is known and no missing values, it is as easy as a naive Bayes classifer

put structure learning into the EM

# Bayesian network structure learning (1)

Problem: have all data but does not know the structure of the Bayesian Netowrk

Solutuion:

determining whether there is an edge between two nodes (A,B): measure the likelihood p(B|A).

What’s the problem of using likelihood in structure learning?

Overfitting

likelihood cannot do better than completely connected network structure.

one way to avoid overfitting is to have a good estimation of the prior probability.

uniform prior is not good because MAP will be Maximum likelihood given uniform prior on hypothesis.

penalty of how many edges in the network.

put your knowledge into initial bayessian network. staring from there, do estimation on adding, adjusting, removing edges.

In all, how to learn unknow structure for Bayesian Network:

1. initial state: empty network or prior network

2. operators: add arc, deletec arc, reverse arc

3. Evaluation: Posterior Probability