Entradas

Extract a group of items from a list randomly online tool

This is an online tool to get a group of "n" items from a list of items you "N" have, randomly. n<N. 1) Write or past the collection of items from where you want to extract random items in the Sample list text input. The items should be separated by a space or just copy/paste them from an excel/csv file directly here. 2) Define the number of items to extract randomly 3) Push the Draw Samples button and you are done! **Press directly the Draw Samples button to see what happens ===================================================== Insert the samples separated by a space or copy paste from an excel: Sample list: Number of samples to draw from the total samples ==================================================== The code to generate this tool is here: https://github.com/bsaldivaremc2/random_item_extractor

AttributeError: module 'pandas' has no attribute 'computation'

If you had the problem: AttributeError: module 'pandas' has no attribute 'computation' When maybe trying to follow the step by step of Capsule networks implementation from this tutorial you might have encounter this error. The solution was shared in this post  . In summary, update the package dask to the version 0.15 or 0.16.  

Tuberculosis MODS Image Diagnosis - Test

Imagen
Best regards. Here I enable an online tuberculosis diagnosis using the Microscopic observation drug susceptibility (MODS)  assay [1]. This tool has been developed using Convolutional Neural Networks , with 15 layers. The performance this model got: Dev set.- Images: 256, specificity: 0.8828, sensitiviy: 0.7969, accuracy: 0.8398. Test-set: Images 5104,  specificity:  0.5329, sensitivity: 0.9510, accuracy: 0.7420 This is a test example to put future models online. This is part of the work being developed at Cayetano Heredia Peruvian Univeristy, R&D Laboratories, Bioinformatics and Molecular Biology laboratory. This is not the best performance achieved though. This tool will classify a MODS image into positive or negative and will show the score for this selection.  The backend is hosted in heroku with a free plan so it might be slow, have failures of communication and might really take a long time for the first run after ...

Tensorflow Batch norm not working

Have you experienced that when using  tf.contrib.layers.batch_norm during test time, the performance is diminished or is completely a mess? If yes, this post is for you. Quick summary: 1) As suggested in [1]:   you have do add this additional code:   update_ops = tf . get_collection ( tf . GraphKeys . UPDATE_OPS )   with tf . control_dependencies ( update_ops ):     train_op = optimizer . minimize ( loss ) 2) You have to use a placeholder to indicate that you are training or not, so you put this in the batch_norm param  is_training = your_place_holder, True for training. 3) If after this it doesn't show a good behavior, change the default  decay = 0.999, to a lower value such as  0.5. Other way to apply batch norm is presented in [2], for a manual setup. Nonetheless, if by using this second approach you still have a bad performance, use the point 3). If you want to use this second approach with Convolutional Neural Netw...

Keras with tensorflow GPU

I haven't seen this information explicitly on the web rather than issues reported. When using a virtual environment where you have installed tensorflow-gpu and you install keras, keras will install the CPU tensorflow version. By doing this it won't be possible to use the GPU. Thus, the correct order to use keras with the GPU tensorflow version is: Install keras Install tensorflow-gpu After this, the default backend for keras will be tensorflow and will work with the GPU. To validate if you are using the GPU [1] : import tensorflow as tf sess = tf . Session ( config = tf . ConfigProto ( log_device_placement = True ))

Image segmentation by color mean and standard deviation

I present an online segmentation javascript implementation of segmentation given the r,g,b means an standard deviation of each one. Since it is javascript it means it will run on your browser using your computation power, thus, you should test it with small images first.   The pixels that fall in the range [ mean - std; mean + std ] will remain in the visualization. Those who don't, will be turned into black. The std factor will multiply the std value of every channel. It is easier to follow the changes by changing a factor than the std values independently.  Upload Image File: Controls Mean: Red Mean Green Mean Blue Mean Controls Std: Red std Green std Blue std Std factor

Deep neural networks visualization

Imagen
In this publication I present a "toy tool" to see how neurons on a Deep Neural Network (DNN) modify the links between them. These links are also called Weights. For those with technical knowledge, the "bias" unit is not shown (Because of lack of time, I will upgrade it later). In addition I haven't implemented yet the predict option, I would probably add it later. Technical Notes: This DNN uses standard back propagation without optimizations such as Adam optimizer or regularization parameters.   I am using Math.js  for the matrix operations. There are some errors I haven't figured out yet how to solve them, specially for Nan values that will appear when showing the visualization (Sometimes happens, no worry =) ) The last layer, the output layer is a sigmoid layer by default. Maybe later I will implement a linear function for regression analysis. And it has been implemented for binary classification by the moment. The weights are randomly init...