What is the difference between a Bayesian network and a naive Bayes classifier?

Short answer, if you’re only interested in solving a prediction task: use Naive Bayes. A Bayesian network (has a good wikipedia page) models relationships between features in a very general way. If you know what these relationships are, or have enough data to derive them, then it may be appropriate to use a Bayesian network. … Read more

matlab execute script from linux command line

In order to run a script you can open Matlab (you can prevent run it without the GUI using -nodisplay and -nodesktop flags), then run the script using the run command, and finally close matlab using exit. You can do all this from a terminal with a single instruction: matlab -nodisplay -nosplash -nodesktop -r “run(‘path/to/your/script.m’);exit;” … Read more

Why is this TensorFlow implementation vastly less successful than Matlab’s NN?

I tried training for 50000 iterations it got to 0.00012 error. It takes about 180 seconds on Tesla K40. It seems that for this kind of problem, first order gradient descent is not a good fit (pun intended), and you need Levenberg–Marquardt or l-BFGS. I don’t think anyone implemented them in TensorFlow yet. Edit Use … Read more

How to wrap a function using varargin and varargout?

Actually, Mikhail’s answer is not quite right. In the case that someFunction is a function that returns a value even if none is requested, which is how a function indicates that the value should be assigned to ans, Mikhail’s wrapper will fail. For example, if someFunction were replaced with sin and you compared running wrapper … Read more

.asv files in matlab

A .asv file is just what you said, an “AutoSave” file. It’s just there so that you don’t lose all your code if your computer crashes/shutdown. You can delete it whenever you want. If you find them annoying you can go to File/Preferences/–>”Editor/Debugger” –> Autosave and turn it off.

calculate turning points / pivot points in trajectory (path)

You could use the Ramer-Douglas-Peucker (RDP) algorithm to simplify the path. Then you could compute the change in directions along each segment of the simplified path. The points corresponding to the greatest change in direction could be called the turning points: A Python implementation of the RDP algorithm can be found on github. import matplotlib.pyplot … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)