Recent submissions

Comment · 1 year ago
The reality is also that not everyone isn't technical enough to deal with `ffmpeg` directly. At some point I basically hosted hacked-together website which simply used `ffmpeg` under the hood so that my dad, who's not as technically literate, could easily convert his files. Now I don't have to do this anymore because I can just host a vert.sh instance:)
Comment · 2 years ago
cupy came out a long time before Jax; remember using it in a project for my BSc around 2015-2016.

Cool to see that it's still kicking!

Comment · 2 years ago
This is great!

Also made some minor modifications: replaced `xsel` with `xclip` and added truncated version of the copied text to the `notify-send`:

  #!/bin/bash 
  # Dependencies: tesseract-ocr imagemagick 
  # on gnome: gnome-screenshot 
  # on kde: spectacle
  # on x11: xsel
  # on wayland: wl-clipboard

  die(){
    notify-send "$1"
    exit 1
  }
  cleanup(){
    [[ -n $1 ]] && rm -r "$1"
  }

  SCR_IMG=$(mktemp -d) || die "failed to take screenshot"

  # shellcheck disable=SC2064
  trap "cleanup '$SCR_IMG'" EXIT

  #notify-send "Select the area of the text" 
  if  which "spectacle" &> /dev/null
  then
    spectacle -n -b -r -o "$SCR_IMG/scr.png" || die "failed to take screenshot"
  else
    gnome-screenshot -a -f "$SCR_IMG/scr.png" || die "failed to take screenshot"
  fi

  # increase image quality with option -q from default 75 to 100
  mogrify -modulate 100,0 -resize 400% "$SCR_IMG/scr.png"  || die "failed to convert image"
  #should increase detection rate

  tesseract "$SCR_IMG/scr.png" "$SCR_IMG/scr" &> /dev/null || die "failed to extract text"
  if [ "$XDG_SESSION_TYPE" == "wayland" ]
  then 
    wl-copy < "$SCR_IMG/scr.txt" || die "failed to copy text to clipboard"
  else
    # xsel -b -i  < "$SCR_IMG/scr.txt" || die "failed to copy text to clipboard"
    xclip -selection clipboard -i < "$SCR_IMG/scr.txt" || die "failed to copy text to clipboard"  
  fi
  # Notify the user what was copied but truncate the text to 100 characters
  notify-send "Text extracted from image" "$(head -c 100 "$SCR_IMG/scr.txt")" || die "failed to send notification"
  exit
Comment · 3 years ago
Though I see what you're saying, using a PPL for VAEs just seems like overkill given the simplistic nature of VAEs.

PPLs are useful when the data generation process is not easily represented by something like a simple multivariate Gaussian, etc. You find many good examples academic research, e.g. epidemiology.

Comment · 3 years ago
I work on one of these PPLs, and I personally find Bayesian inference to be useful in a few cases:

1. When your main objective is not prediction but understanding the effect of some underlying / unobserved random variable.

2. When you don't have tons data + you have very clear ideas of the data generation process.

(1) is mainly relevant for science rather than private companies, e.g. if you're an epidemiologist, you're generally speaking interested in determining the effect of certain underlying factors, e.g. effect of mobility patterns, rather than just predicting the number of infected people tomorrow since the hidden variables are often someting you can directly control, e.g. impose travel restrictions.

(2) can occur either in academic settings or in private sector in applications such as revenue optimization. In these scenarios, it's also very useful to have a notion of the "risk" you're taking by optimizing according to this model. Such a notion of risk is in the Bayesian framework completely straight-forward, while less so in the frequentist scenarios.

I've been involved in the above scenarios and have seen clear advantages of using Bayesian inference, both in academia and private sector.

With that being said, I don't think ever Bayesian inference, and thus even less so PPLs, are going to "take off" in a similar fashion to many other machine learning techniques. The reason for this are fairly simple:

1. It's difficult. Applying these techniques efficiently and correctly is way more difficult than standard frequentist methods (even interpeting the results is often non-trivial).

2. The applicability of Bayesian inference (and thus PPLs) is just so much more limited due to the computational complexity + reduction in utility of the methods as data increases (which, for private companies, is more and more the case).

PPLs mainly try to address (1), and we do have examples of very successful examples of this, e.g. PyMC3 (they also have a bunch of nice examples of applying Bayesian inference in private sector context), and Stan (maybe more heavily used in academia).

Comment · 3 years ago
Comment · 3 years ago
I have accounts with both gmail (personal) and outlook (work), and so using an external email client let's me have all those in one place.
Comment · 3 years ago
Anki is free on anything but iOS. Don't know why the iOS app is the only one with a fee.
Comment · 4 years ago
In addition, you will be notified if anyone accesses your records. This defers most sane people from looking up the records of family members, friends and neighbors.
Comment · 6 years ago
The issue is that Germany is testing ferociously while in the US this is not the case. It's therefore likely that the US numbers are severely underestimated, while Germany's are much closer to their true value.

Worth noting that Germany not having any deaths despite such a large number of cases can also indicate that they discover the infection very early, and similarly the number of US deaths can indicate late discovery.

Comment · 8 years ago
Cheers :) Autocorrect got me real goof!
Comment · 8 years ago
If time allows it and I want to ensure I understand some concept, explaining it to someone tend to be very useful. Writing a blog post is then a great way to do so without requiring one of my friends to listen!

I do this without even publishing the posts. As mentioned in one of the other comments, I am vary of making these accessible for the public due to lack of "oversight". I feel like there's a responsibility when sharing information, and if I'm not 100% sure what I've written is correct, I don't want to mislead people. And even if correct, one should really ask themselves if it actually adds something to the topic which is otherwise not easily accessible. I think this is especially important to ask today when there is so much information already available.

Hence I actually think writing blog posts as means of understanding is a really goof approach; whether or not the piece should be made public is something that should then be judged case-by-case.

Comment · 8 years ago
Most certainly. I did not intend to question the usefulness of maxent models. I just find myself a bit uneasy with maxent as a derivation of and/or explanation of the ubiquity of the normal distribution, given the two issues mentioned above when we're talking about the continuous case. I was wondering if you might have some insight into the issue which could remedy this feeling of uneasiness :)

And regarding the moments, it's just that the normal distribution is the only distribution with a finite number of non-zero moments. Therefore, constraining higher order moments is not so straight forward.

Also might be worth noting that technically, if one was sufficiently UNreasonable, one could constrain the target distribution to take on specific values given specific inputs. This would not be very useful in any real-world applications. Then choosing between constraining only the first moment ("minimal" constraints), or constraining each point you've observed to take on the normalized frequency ("maximal" constraints) becomes entirely up to you. Therefore I don't see quite how maxent models give us the tools for deciding between complexity and accuracy, as the maxent models can be on either end of the spectrum depending on what constraints we choose.

(Unsure if you were implying that it did, but nonetheless it might be something to note.)

Comment · 8 years ago
Thank you, I really appreciate the response. This was useful.

I do see the reasoning for choosing the normal due to it being the only distribution with finite non-zero moments, and thus, as you nicely pointed out, constraints on a finite number of higher order moments will not give a unique distribution.

But, due to the issues we've now mentioned, I find myself a bit uneasy wrt. maxent as a derivation of and/or as an explanation of the ubiquity of the normal distribution. Thus I find myself more comfortable with some of the other derivations demonstrated by Jaynes.

And thank you for the paper reference; will have a proper look at it sometime. It might be related to

Comment · 8 years ago
Thank you for the link to Jaynes' book! Really nice to see the different approaches.

I'm intrigued by your comment on maximum entropy, as I personally struggle with the maximum entropy derivation due to the fact that we're using differential entropy ("continuous" entropy) to derive the Gaussian under constraints on the first and second moment. The differential entropy does not satisfy the same properties as entropy for a discrete distribution, some of which are the very properties that motivated entropy as a measure of information. Jaynes himself wrote a paper on this topic of continuous entropy in the 60s (can dig out the reference in the morning). Even ignoring this, I also struggle a bit with "we're only constraining the two first and second moment". Why exactly one the first two? Why not the three first, etc.? One could say it's motivate by the fact that the Gaussian is the only distribution with finite nonzero moments, but that seems a bit handwavey?

Would genuinely appreciate some input here, as the concept of Principle of Maximum Entropy is something I have a bit of trouble coming to terms with for the reasons described above (in general, mainly because choice of constraints is abritrary).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton