Predicting probabilities with H2O flow - h2o

Is it possible to predict probabilities in a binary classification task a in H2O flow? In particular I am finding difficulties in camputing the probability instead a crisp prediction because I can't see option in the UI of H2O when predicting.
If it's not possible doing it in H2O Flow, is there a way to do it in R (or Python) using the same model built in H2O flow?
Thanks in advance for any help.

This is possible in Flow and it is also possible to get the model from the backend using its key and then continue with your model analysis in one of the apis (R/Py)
Please also take a look at the documentation on how to make predictions in Flow if needed.
After you build a model you will see that there is a predict button:
Click on the predict button.
Specify a name for your prediction frame, the model will already be set, select the frame you want to predict on using the frame dropdown menu, and then click on the action button called predict.
In the next cell called Prediction you will see a table that will have three hyperlinks (model, frame, and predictions). The third hyperlink should correspond to your predictions dataframe, which you provided the name for or H2O-3 provided a default name for.
Click on the hyperlink in the predictions row or create a new cell, type getFrameSummary "prediction" (without the ` marks, and replace "prediction" with the name of your prediction frame).
Now click on the view data button, and if your binary target is of type enum (i.e. categorical and not numeric) you will see a table with prediction labels and probabilities.

Related

How to delete cell data upon data entry in Apple Numbers?

I'm trying to make a quick reference sheet for a TTRPG campaign, and I'm trying to create a section of the sheet that will account for leveling up, and by extension, skill points. Since I will not know how the players wish to split skill points, I need a cell equation for inputting x number of points out of y and then adding that input to the appropriate skill. I have that part figured out I believe, but I'm trying to find a way to keep using the cell for various inputs and outputs. Is there some type of "clear cell" function built into numbers or some type of 'for loop' function I could use?
I have been trying to find an answer but all that shows up is just how to clear a cell using the delete key.

dc.js heatmap expanding data

I am trying to show machine states over time. Part of this is to reproduce/automate a report that used to be done by hand. It consists of coloring 2minute 'time slices' in Excel based on what the machine is doing.
(Sorry, not enough reputation to post a picture, but it is a classic heatmap where the state drives the color. Some non DC-JS fiddle: http://jsfiddle.net/ww6Lbnc5/4/)
I was able to generate most of what I want in the following jsfiddle:
http://jsfiddle.net/hwhfxz2t/14/
See fiddle for code.
The total state duration (for selected time frame) is shown in the pieChart, followed by the individual state lines and then the heatmap that people are used to. (the ZOOM and date selection buttons do not work in the fiddle but are there to select specific data ranges or zoom in if you like).
The line charts uses the original representation of the states, which consists of a time the state is entered and a duration.
In order to make the heat map work, I had to (I think) take the original data and convert it into individual minute chunks and mark them with a state. So for instance the original data specifying:
RUN state starting 14:30 for 300 seconds
becomes:
14:30=RUN, 14:31=RUN, 14:32=RUN, 14:33=RUN and 14:34=RUN
The code in lines 233-297 loops through the original data and generates a new one that does this. In cases where there is more than one state within a given minute, the last state survives.
This works okay but it seems that this code is exactly what is normally done in group().reduce(add,remove,init). But in this case I need to add multiple timeslots depending on the duration of a state.
Also, because it is now using a different crossfilter, maps do not update each other.
Here are my questions related to this:
Can I display a heatmap without supplying information for all individual
'cells'? (i.e. straddle cells based on a value, similar to rowspan in a table)
Can I add multiple values at once inside group().reduce()?
Is there an easy way to invert the yAxis so 0 is at the top?
When clicking a row in the heatmap, it selects a column and vice-versa?
I'm not sure if this should be in the crossfilter group. If so please ignore my rambling. If someone knows how to keep the charts linked by grouping better, please let me know.
--Nico
Concerning Question 3:
DC.js heatmaps currently do not support custom order functions on axis but there is a pull request that has been merged into the developing branch and should be accessible to the public soon.
You could manually edit the dc.js file to set the sorting in heatmaps to a custom function. In the latest (2.0.0-beta10) version it is the following line:
rowValues.sort(d3.ascending);
and accordingly
colValues.sort(d3.ascending);

Can grapgviz be embeded into html page and dynamically corresponde to user's click?

I am now looking for a drawing tools which is used in my website.This tool can draw relationship diagram and can correspond to user's click.For example ,this graph shows the partnership of employees in a company , each node of the graph represents a employee. When we left click on one of the nodes of the graph , the page will show another figure,containing the details of this employee.
Some one recommend graphviz, but it seems that graphviz can only draw pre-defined picture and cannot correspond to user's input.
So , any ideas or recommendations?
You could use GraphViz to compute positions of nodes on the backend and send them back to the browser, so technically it could react to the user's input. A more natural approach would seem to me to do these computations directly in the browser, though, and I believe that's what you mean when you say react to users' input. You might want to check out http://d3js.org

Highlight Data Points in Birt Reports

creating simple charts with BIRT is easy, but now I would like to bring some more life to them...
imagine a simple line chart. Let's define as a requirement, that the maximum value should be highlighted. A further requirement would be that if the user clicks on this data point, something happens.
How can I solve this?
I can imagine that I could created a second value series which consists only of the highlighted data points.
But it would be nicer if there was a JavaScript API (or even a server side java api) with which I could loop through the data points and add a highlight on the fly. Is this possible?
I think I've found a good starting point:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/276-birt-chart-scripting-dynamic-markers-and-datapoint-colors/
Now I have to find a way to add on click events to certain data points...

Automatic selection of control points in Matlab

Is there a way to select the control points automatically in Matlab instead of manually selecting them by cpselect? Thank you very much.
I just recently worked on a project where I had to do the same thing -- eventually I found that you can select control points automatically, but only if you use automatic selection to find the control points for both the unregistered and the orthophoto. (The control points used to define image transforms are stored in matrices, so if you can get your automated system to output a set of point coordinates in matrix form you can pass them to straight to cp2tform and bypass cpselect entirely.) On the other hand, cpselect stores corresponding pairs of image points using some kind of special data structure, so that I was never able to just pass it a set of control points for one image while leaving the other image blank.
I don't have the Matlab Image Processing Toolbox, but I see from the documentation that cpeselect can be called with an argument specifying the initial set of control points. Can you reduce your task to automating the creation of that initial set?

Resources