Tuesday, April 7, 2020

The Joys of setting up JavaFX in Eclipse IDE (but it actually worked at the end of it all)

The installation of a version of Eclipse required JDK version 1.8 (aka JDK 8), and Eclipse Neon.
I spent way too much time getting JavaFX to work on Eclipse on my Mac.
Here is the original error in Eclipse when trying to import JavaFX:



The official error I was getting when trying to use the program was something like: java.lang.NoClassDefFoundError: javafx/application/Application
Notice the red underline underneath javafx.application.Application; and the "extends Application"

I was not able to use JavaFX in my version of Eclipse. It took me a while to realize that on the website for the JavaFX installation in Eclipse (e(fx)clipse: https://www.eclipse.org/efxclipse/install.html#for-the-lazy) they did not provide the web address.

There is a separate website to install a the Eclipse IDE with all the packages pre-installed (https://efxclipse.bestsolution.at). I chose the "Get Started Fast" option.

Try to install a version of Eclipse with JavaFX already installed. After installing the 380 MB file, I moved the file to my applications folder, to be met with this:

"Eclipse" is damaged and can't be opened. You should move it to the Trash.

The program is quarantined and you must use these commands in the terminal to un-quarantine it:

1. Open the terminal and make the working directory the file with Eclipse (use cd \path to eclipse .... which is \Applications in my case since I moved Eclipse there)
2. type in: $ xattr Eclipse.app/
You should see com.apple.quarantine
3. Remove the quarantine with xattr -d com.apple.quarantine Eclipse.app/

Opening the Eclipse launcher I found this error:


An error has occurred. See the log file.  ...Eclipse/metadata/log

To fix, right click on the Eclipse icon, go to show package contents, then go to Contents --> Eclipse --> Eclipse.ini. To change the eclipse.ini file, add in where my virtual machine (JVM) is located. This site explained it well. A command needed to be added before vmargs:

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin

If you did not point the ini file to JVM 1.8 you will see this error message:


It finally worked:

Yea!

Tuesday, March 31, 2020

Correlation vs Causation - the Bradford Hill criteria

Going through discussion posts on the Kaggle COVID-19 challenge, I came across a poster (Savanna Reid) who mentioned the virtues of levels of evidence and the dangers of trusting too much in peer review, journal impact factor, and publication bias.

She also introduced the Bradford Hill criteria to me, which I will outline here in the hopes that it will come to mind later if I am ever worried about causation and correlation.


Sir Austin Bradford Hill

Basically, Sir Austin Bradford Hill was a dude around when big tobacco companies had doctors in their pockets prescribing cigarettes for all kinds of diseases. Cigarette companies would gawk and feign ignorance when anyone would claim that cigarettes were anything but the miracle cure for everything.

The Wikipedia article on the subject is here, but to summarize the 9 essential criteria are:
1. Strength
2. Consistency
3. Specificity
4. Temporality
5. Biological gradient
6. Plausibility
7. Coherence
8. Experiment
9. Analogy

Reversibility is another proposed criteria. Some argue that no set of rules should matter and just to apply common sense, others that the setting in which a study is carried out matters.

The MAGIC criteria concern how statistical arguments should be used, and the field of causal inference also goes into a similar subject.

The problem of correlation and causation came up last night while I was reading a submission here that claimed that there is a definite strong relationship between air temperature and virus transmission, although he did not attempt to show statistical evidence of this aside from some nice visualizations on virus predominance in China, Europe, and North America. However, as another Kaggler humorously pointed out, there are also more Macbook Pros in Europe and China and North America versus Africa, so maybe that is the cause of the spread of the virus?? It is also likely due to a lack of testing in some countries.