For the upcoming release of Bio7 I worked hard to improve the R editor features. So I added some new features and improvements to assist in the creation of R scripts in Bio7.
One of the highlights is the newly integrated dynamic code analysis when writing an R script.
Here a short overview of some new R editor features I integrated so far:
Detect and display unused variables and functions
Detect missing functions and variables
Added a new code assist list when triggered in function calls
Check of function arguments
Check of wrong function argument
Available help for mistyped functions (% similarity)
Improved Code Completion in general
Added a toolbar with two HTML help actions to the context help dialog (if you hover over a method)
Improved Code Completion to list local scope self defined variables and functions
Added an refactor action to extract variables
Added an refactor action to extract functions
Added more Quickfixes
Quickfixes can now be opened by hovering over a problem or error marker
Added an automatic close action of parentheses, brackets, braces and strings in the editor
Improved the general parsing speed
Added new key shortcuts to faster perform R editor actions
New action and key shortcut to open the plot preferences faster
Added new on/off preferences for the new features
Improved the display of the Outline view for variables and functions
There is of course some room for improvements and there are some rough edges in the implementation of the dynamic code analysis since the R language is a highly dynamic language. However I hope that this features will be a help in the creation of correct R scripts in the R editor of the next Bio7 release.
PyDev Editor: https://marketplace.eclipse.org/content/pydev-python-ide-eclipse
A very powerful Python editor which can be used to execute Bio7 Jython and Python scripts instead of the Bio7 default editor. In addition Bio7 can use the PyDev editor to execute scripts running on the Bio7 Java classpath. If you open Jython/Python scripts with the PyDev editor the default Bio7 action will be visible to execute the scripts on the Bio7 classpath.
I created a new Bio7 example which demonstrates how to classify an image with Bio7, ImageJ and R.
For the classification I used the “randomForest” R package and an image example of ImageJ so you can reproduce the example quite easily. I made the example script as easy as possible and trained the classifier with 64 trees by default (see literature below). Not shown in the video is the procedure to control the prediction of the trained classifier with test data. You can find a simple script in the repository, too, which uses a method of the powerful ‘caret’ package.
If you have some recommendations of how to effectively use a decent classifier for image classification (e.g., which classifier is well suited for images, which tuning parameters are useful in this context, which additional signatures could be used, etc.) I would be happy to hear.
Fernández-Delgado, M., Cernadas, E., Barro, S. & Amorim, D. Do we Need Hundreds of Classifiers to Solve Real World Classification Problems? Journal of Machine Learning Research15, 3133–3181 (2014).
Oshiro, T. M., Perez, P. S. & Baranauskas, J. A. in Machine Learning and Data Mining in Pattern Recognition (ed. Perner, P.) 154–168 (Springer Berlin Heidelberg, 2012).
Latinne, P., Latinne, P., Debeir, O. & Decaestecker, C. Limiting the Number of Trees in Random Forests. IN PROCEEDINGS OF MCS 2001, LNCS 2096, 2001.
In the current release of Bio7 2.3 two new plot preferences are available to automatically plot data with the size of the visible display (as an image) or with the size of available ImageSizeX and ImageSizeY R workspace variables.
The second option is handy if you transfer images from ImageJ to the R workspace (the variables ImageSizeX and ImageSizeY will be autmatically created, too). You can then create an R image plot (e.g. from a classification) in the same size as an overlay of the original image (in turn plotted and overlayed in ImageJ).
Improvements of the R editor for the upcoming Bio7 2.4 release
For the upcoming release of Bio7 I also add new features to the Bio7 R editor.
Among other things until now I improved the code completion. If you now type a a left parenthesis you get a help tooltip if the function is known (if you load frequent used R packages with the Bio7 GUI interface the package function context will be added to the code completion, tooltip interface).
Screenshot 1: Improved tooltip when a left parenthesis is typed.
Figure 2: Code completion (Keys: CTRL+Space) now preselects the right context (e.g. functions with ‘.’ char)
In addition I added a function to set right parentheses, braces, etc. automatically when left parentheses, etc. are typed in the R editor.