Eureqa API Reference

analysis

class eureqa.analysis.Analysis(body, eureqa)

Represents an analysis on the server.

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • body (dict) – Class metadata as dictionary.
Variables:
  • name (str) – The analysis name.
  • description (str) – The analysis description.
add_card(card)

Add an analysis Item to this analysis

Parameters:card (eureqa.analysis.cards.Card) – Item to add to the analysis. Must not already be associated with an Analysis.
analysis_id

The id of the analysis

create_binned_mean_plot_card(datasource, x_var, y_var, title=None, description=None, needs_guides=False, axis_labels=None, label_format=None, collapse=False)

Creates a new binned-mean-plot card. Adds the card to this analysis.

Parameters:
  • datasource (DataSource) – Data source for the card’s data
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • title (str) – The title of the card
  • description (str) – The card’s description.
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (list) – Axis labels for this card’s plot
  • label_format (list) – Label format for this card
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

BinnedMeanPlotCard

create_box_plot_card(datasource, x_var, y_var, title=None, description=None, needs_guides=False, axis_labels=None, label_format=None, collapse=False)

Creates a new box-plot card. Adds the card to this analysis.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the card’s data
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • title (str) – The title of the card
  • description (str) – The description of the card
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (list) – Axis labels for this card’s plot
  • label_format (str) – Label format for this card
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

BoxPlotCard

create_by_row_plot_card(datasource, x_var, plotted_vars, title=None, description=None, focus_variable=None, should_center=True, should_scale=False, collapse=False)

Create a new by-row plot card. Adds the card to this analysis.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the card’s data
  • x_var (str) – Name of the variable to plot as the X axis
  • plotted_vars (str) – List of string-names of variables to plot. (To modify a variable’s display name, first create the card; then modify the display name directly on it.)
  • title (str) – The card’s title.
  • description (str) – The card’s description.
  • focus_variable (str) – Name of the variable in ‘plotted_vars’ to bring to the foreground
  • should_center (bool) – Should the plot be centered?
  • should_scale (bool) – Should the plot scale?
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

ByRowPlotCard

create_card(component)

Create a new Card on this Analysis containing the specified Component

Parameters:component – Component to render inside the Item
Returns:the created Item
create_custom_plot_card(plot, title=None, description=None, collapse=False)

Creates a new custom plot card. Adds the card to this analysis.

Parameters:
  • plot (eureqa.analysis.components.CustomPlot) – The Plot to be displayed in the card.
  • title (str) – The card title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

CustomPlotCard

create_distribution_plot_card(data_source, variable, title=None, description=None, collapse=False)

Creates a new distribution plot card. Adds the card to this analysis.

Parameters:
  • data_source (eureqa.DataSource) – The data source to which the variable belongs.
  • variable (str) – The name of the variable that will be displayed on the card.
  • title (str) – The card title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

DistributionPlotCard

create_double_histogram_plot_card(datasource, x_var, y_var, title=None, description=None, needs_guides=False, axis_labels=None, label_format=None, collapse=False)

Creates a new double-histogram card. Adds the card to this analysis.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the card’s data
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • title (str) – The title of the card
  • description (str) – The description of the card
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (list) – Axis labels for this card’s plot
  • label_format (str) – Label format for this card
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

DoubleHistogramPlotCard

create_html_card(html, title='HTML', description=None, collapse=False)

Creates a new HTML card. Adds the card to this analysis.

Parameters:
  • html (str) – The card’s HTML body.
  • title (str) – The card title.
  • description (str) – Deprecated; unused. (This card doesn’t have a Description.)
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

HtmlCard

create_image_card(image_path, title=None, description=None, collapse=False)

Creates a new text card containing only header text and one image.

Parameters:
  • image_path (str) – the filepath to the image in your filesystem.
  • title (str) – The card title.
  • description (str) – a description of the card, to appear above the image
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

TextCard

create_model_card(solution, title=None, description=None, collapse=False)

Creates a new model card. Adds the card to this analysis.

Parameters:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • title (str) – The card title.
  • description (str) – The card description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

ModelCard

create_model_evaluator_card(datasource, solution, title=None, description=None, collapse=False)

Creates a new model evaluator card. Adds the card to this analysis.

Parameters:
  • datasource (eureqa.DataSource) – DataSource to fetch data from for the primary model evaluator
  • solution (eureqa.Solution) – Solution to fetch results from for the primary model evaluator
  • title (str) – Title of the card. Defaults to ‘Evaluate Model’.
  • description (str) – Description of the card.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card.

Return type:

ModelEvaluatorCard

Additional models can be added to this model by calling the add_solution_info method on the returned object.

create_model_fit_by_row_plot_card(solution, title=None, description=None, collapse=False, x_axis=None)

Create a new model fit by-row plot card. Adds the card to this analysis. Note that by-row plots are meant for use with Numeric searches. They may not work properly if used with other types of searches.

Parameters:
  • solution (Solution) – The Solution object for which this card is being created
  • title (str) – The card’s title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

ModelFitByRowPlotCard

create_model_fit_plot_card(solution, x_axis=None, title=None, description=None, collapse=False)

Create a new model fit card. Adds the card to this analysis. Automatically choose the correct type of card (by-row plot or separation plot) based on the specified search. Numeric searches use by-row plots; time-series searches use separation plots.

Parameters:
  • solution (Solution) – The Solution object for which this card is being created
  • title (str) – The card’s title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

ModelFitPlotCard

create_model_fit_separation_plot_card(solution, title=None, description=None, collapse=False)

Create a new model fit separation-plot card. Adds the card to this analysis. Note that separation plots are meant for use with time-series searches. They may not work properly if used with other types of searches.

Parameters:
  • solution (Solution) – The Solution object for which this card is being created
  • title (str) – The card’s title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

ModelFitSeparationPlotCard

create_model_summary_card(solution, collapse=False)

Creates a new model summary card. Adds the card to this analysis.

Parameters:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

ModelSummaryCard

create_scatter_plot_card(datasource, x_var, y_var, title=None, description=None, needs_guides=False, axis_labels=None, label_format=None, collapse=False)

Creates a new scatter-plot card. Adds the card to this analysis.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the card’s data
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • title (str) – The title of the card
  • description (str) – The card’s description
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (list) – Axis labels for this card’s plot
  • label_format (list) – Label format for this card
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

Object representing the created card

Return type:

ScatterPlotCard

create_text_card(text, title='Text', description=None, collapse=False)

Creates a new text card. Adds the card to this analysis.

Parameters:
  • text (str) – The card text.
  • title (str) – The card title.
  • description (str) – Deprecated; unused. (This card doesn’t have a Description.)
  • collapse (bool) – Whether the card should default to be collapsed.
Returns:

An object that represents the newly created card.

Return type:

TextCard

delete()

Deletes the analysis from the server.

description

The description of the analysis

get_cards()

Get all Analysis Cards associated with this Analysis

Returns:A list of Card objects that are rendered as part of this Analysis
Return type:list of Card
get_components()

Get all Analysis Components associated with this Analysis

Returns:A list of Component objects attached to this Analysis, that may be rendered by Items in the Analysis
Return type:list of _Component
name

The name of the analysis

upload_image(image_path)

Upload an image to the server, to be embedded in analysis cards.

Parameters:image_path (str) – the filepath to the image on your filesystem.
Returns:An object that represents the newly uploaded image.
Return type:Image

analysis_file

class eureqa.analysis.analysis_file.AnalysisFile(analysis, file_id)

AnalysisFile object

Represents a file that is attached to an Analysis, and can be embedded in various places within the Analysis. AnalysisFiles are often either images (.jpg, .png, etc) or raw data files (.csv, .xls, etc), but any type of file is supported.

classmethod create(cls, analysis, file)

Upload a new file to an Eureqa Analysis.

Parameters:
  • analysis (eureqa.analysis.Analysis) – Analysis to upload the file to
  • file (str) – File to upload. Can be either a string, in which case it is treated as the binary data of a file, or an actual Python file object or file-like object.
Return type:

AnalysisFile

delete()

Delete this file from the server

get()

Return the raw data of this file

Return type:file
update(file)

Update the contents of an existing file on the server. Overwrites the file’s previous data.

Parameters:file (str) – File to upload. Can be either a string, in which case it is treated as the binary data of a file, or an actual Python file object or file-like object.
url()
Returns:URL that this image can be reached from

cards

class eureqa.analysis.cards.Card(analysis=None, item_id=None, component=None, order_index=None, collapse=None)
Variables:collapse (bool) – Whether the Item is currently collapsed or not
collapse

Whether this item should be rendered as “collapsed” (with its content hidden)

Return type:bool
move_above(other_card)

Moves this card above another card.

Parameters:other_card (eureqa.analysis_cards.AnalysisCard) – The other card above which to move this card.
move_below(other_card)

Moves this card below another card.

Parameters:other_card (eureqa.analysis_cards.AnalysisCard) – The other card object below which to move this card.

components

class eureqa.analysis.components.InteractiveExplainer(datasource=None, search=None, solution=None, analysis=None, component_id=None, component_type=None)

Represents an interactive model explainer component on the server.

Parameters:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • search (eureqa.Search) – The search that the specified solution belongs to.
  • datasource (eureqa.DataSource) – The datasource that the specified search belongs to.
Variables:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • search (eureqa.Search) – The search that the specified solution belongs to.
  • datasource (eureqa.DataSource) – The datasource that the specified search belongs to.
datasource

The data source providing data for this component

Return type:eureqa.DataSource
search

The Search that is solved by this Explainer’s Solution

Return type:eureqa.Search
solution

The Solution that is being explained

Return type:eureqa.Solution
class eureqa.analysis.components.VariableDistributionPlot(datasource=None, variable_name=None, analysis=None, component_id=None, component_type=None)

Represents a distribution plot card on the server.

Parameters:
  • datasource (eureqa.DataSource) – The data source to which the variable belongs.
  • variable (str) – The name of the variable that will be displayed on the card.
  • title (str) – The card title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The card title.
  • datasource (str) – The datasource used by the card.
  • variable (str) – The variable plotted by the coard.
datasource

The data source providing data for this component

Returns:data source providing data for this component
variable

(Deprecated) Name of the variable to plot. For backwards compatibility.

Return type:str
variable_name

Name of the variable to plot

Return type:str
class eureqa.analysis.components.BoxPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a box plot card on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the component’s plot.
  • y_var (str) – The Y-axis variable for the component’s plot.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str
class eureqa.analysis.components.DoubleHistogramPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a double-histogram plot component on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the card’s plot.
  • y_var (str) – The Y-axis variable for the card’s plot.
  • title (str) – The title of the card.
  • description (str) – A textual description of the card.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (dict) – Axis labels for this card’s plot. Set keys “x” and “y” to set the X and Y axis labels.
  • label_format (dict) – Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str
class eureqa.analysis.components.BinnedMeanPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a binned mean plot component on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the card’s plot.
  • y_var (str) – The Y-axis variable for the card’s plot.
  • title (str) – The title of the card.
  • description (str) – A textual description of the card.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (dict) – Axis labels for this card’s plot. Set keys “x” and “y” to set the X and Y axis labels.
  • label_format (dict) – Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str
class eureqa.analysis.components.VariableLineGraph(datasource=None, x_var=None, plotted_variables=None, focus_variable=None, should_center=None, should_scale=None, analysis=None, component_id=None, component_type=None)

Represents a variable line graph on the server.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the component’s data
  • x_var (str) – Name of the variable to plot as the X axis
  • plotted_vars (str) – List of string-names of variables to plot.
  • focus_variable (str) – Name of the variable in ‘plotted_vars’ to bring to the foreground
  • should_center (bool) – Should the plot be centered?
  • should_scale (bool) – Should the plot scale?
  • collapse (bool) – Whether the component should default to be collapsed.
Variables:
  • title (str) – The component’s title.
  • focus_variable (str) – Focused (foreground) variable for the component. Must be a member of ~eureqa.analysis.components.ByRowPlot.plotted_variables
  • x_var (str) – Name of the variable to plot as the X axis
  • plotted_variables (list) – Variables to plot. (List of string variable names.)
  • should_center (bool) – Should the plot be centered?
  • should_scale (bool) – Should the plot scale?
datasource

The data source providing data for this component

Returns:data source providing data for this component
focus_variable

The variable that is currently in focus (in the foreground) for this component. Must be a member of ‘plotted_variables’.

Returns:focus_variable for this component
Return type:str
plotted_variables

The plotted variables for this component.

Returns:List of the names of the variables being plotted against the X axis
Return type:tuple
should_center

The should_center option for this component.

Returns:whether this plot should be centered
Return type:bool
should_scale

The should_scale option for this component.

Returns:whether this plot should be scaled
Return type:bool
x_var

The X-axis variable for this component

Returns:the name of the X-axis variable for this component
Return type:str
class eureqa.analysis.components.CustomPlot(datasource=None, width=None, height='400px', x_axis_label=None, y_axis_label=None, show_legend=True, zero_x_line=False, zero_y_line=False, x_tick_format=None, y_tick_format=None, guides_type='XY', analysis=None, component_id=None, component_type=None)

Represents a plot to be displayed in an analysis plot card.

By calling the plot() method multiple times on one instance of this class, multiple lines and scatter plots can be superimposed on this object.

Parameters:
  • width (str) – Set manual dimensions for the plot in “px” units (e.g. 350px). Defaults to full panel width.
  • height (str) – Set manual dimensions for the plot in “px” units. Defaults to a constant height of 400px.
  • x_axis_label (str) – The label to use on the x axis of the plot.
  • y_axis_label (str) – The label to use on the y axis of the plot.
  • show_legend (bool) – Controls whether or not a legend will be used in the plot.
  • zero_x_line (bool) – Draws a horizontal line through the origin
  • zero_y_line (bool) – Draws a vertical line through the origin
  • x_tick_format (str) – Format for x axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format
  • y_tick_format (str) – Format for y axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format
  • guides_type (str) – The type of value-guides to show when hovering over a point in the graph. Valid values are “XY”, “YY” or False. XY guides will show the x and y values for the point under the cursor. YY guides will show the x and y values of each component for the data point closest to the cursor. False will turn off value guides.
datasource

The data source providing data for this component

Returns:data source providing data for this component
delete()

Delete the Plot and any associated data which has been uploaded.

guides_type

The type of value-guides to show when hovering over a point in the graph. Valid values are “XY”, “YY” or False. XY guides will show the x and y values for the point under the cursor. YY guides will show the x and y values of each component for the data point closest to the cursor. False will turn off value guides.

Return type:str
height

The height of the plot. Represented as a string containing a valid CSS “width” attribute; for example, ‘300px’.

Return type:str
plot

Add new data to the plot with the specified options.

If a datasource is specified, x and y can be provided as expressions in terms of the variables in that datasource. Otherwise, x and y must be lists of data of identical length.

Parameters:
  • x (list) – X axis data. Either a list of input values, or if a datasource is specified, an expression in terms of that datasource’s variables.
  • y (list) – Y axis data. Either a list of input values, or if a datasource is specified, an expression in terms of that datasource’s variables.
  • datasource (DataSource) – If provided, a specific DataSource to use as a base for the variables to be plotted.
  • style (str) – A matplotlib-like style string of ‘o’ or ‘-‘ or ‘-o’ to indicate circle, line, or line-circle, respectively.
  • color (str) – CSS color.
  • line_width (int) – The width of the line, if applicable.
  • circle_radius (int) – The radius of each circle, if applicable.
  • use_in_plot_range (bool) – The chart auto-computes the x and y axis ranges based on the data for each component. If you want to add a component, but have its data not be used to compute the x and y axis ranges, set this value to False. For example, if you want to make a scatter plot, with a trend line going through it, then setting this field to False for the trend-line component will make the chart snugly fit the points, with the trend line extending beyond.
  • error_bars_upper_values (list) – Specifies the tops of error bars. Either a list of values, or if a datasource is specified, an expression in terms of that datasource’s variables. If input values is a list, then this must be a list as well.
  • error_bars_lower_values (list) – Specifies the bottoms of error bars. Either a list of values, or if a datasource is specified, an expression in terms of that datasource’s variables. If input values is a list, then this must be a list as well.
  • legend_label (str) – A string label to be used in the legend. If unspecified, this plot will not appear in the legend.
  • tooltip_template (str) – Any valid Handlebars template. The template will be provided the x and y values as “x_value” and “y_value”, so you can use these to format a tooltip for each point. For example, “<div class=”my_awesome_tooltip”>When age is {{x_value}}, salary is expected to be {{y_value}}</div>”
show_legend

Whether or not the legend should be shown

Return type:bool
upload_data(eureqa=None)

Upload the plot data to eureqa. This is required before the plot can be viewed.

Parameters:eureqa (Eureqa) – a eureqa connection
width

The width of the plot. Represented as a string containing a valid CSS “width” attribute; for example, ‘400px’.

Return type:str
x_axis_label

The label of the plot’s X axis

Return type:str
x_tick_format

Format for x axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format

Returns:str
y_axis_label

The label of the plot’s Y axis

Return type:str
y_tick_format

Format for y axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format

Returns:str
zero_x_line

Whether an axis line should be shown for x=0

Return type:bool
zero_y_line

Whether an axis line should be shown for y=0

Return type:bool
class eureqa.analysis.components.HtmlBlock(html='', analysis=None, component_id=None, component_type=None)

Represents a component containing free-form user-specified HTML.

Parameters:html (str) – Body of the card.
Variables:html (str) – Body of the card.

If you need particular styles or JS libraries, you MUST define and/or load them as part of the HtmlBlock where they are needed. Any styles or JS objects defined by Eureqa may change or be removed from release to release.

Embedding custom JavaScript (or CSS, which can contain JavaScript) from a malicious third-party source can grant that source access to your site. Only embed content from trusted sources.

html

The body of this card.

Returns:body of this card
Return type:str
class eureqa.analysis.components.DownloadFile(file_content=None, link_text=None, filename=None, analysis=None, component_id=None, component_type=None)

DownloadFile component Represents a Download link for a file within an Analysis, including the contents of that file.

Parameters:
  • file_content (str) – The contents of the file as a str()
  • link_text (str) – The text of the HTML download link in the Analysis
  • filename (str) – The name of the downloaded file
file
Return type:eureqa.analysis.analysis_file.AnalysisFile

Text of the link as rendered by the component

class eureqa.analysis.components.TableBuilder(data, title, default_rows_per_page=20, column_names=[], striped=True, search_box_place_holder='Search')

High level API to build a table in analysis

Parameters:
  • 2Darray, pandas DataFrame or List of columns data (numpy) – table data
  • title (str) – table title
  • default_rows_per_page (int) – the default number of rows per page when the table is initially rendered
  • of str column_names (List) – names of each column
  • striped (bool) – whether or not the table rows should be rendered in alternating grey and white stripes
  • search_box_place_holder (str) – the default text shown in the search box when user hasn’t typed any search keyword
class eureqa.analysis.components.FormattedText(format_str)

Return a formatted version of format_str, substituing format specifications with component references.

base

binned_mean_plot

class eureqa.analysis.components.binned_mean_plot.BinnedMeanPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a binned mean plot component on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the card’s plot.
  • y_var (str) – The Y-axis variable for the card’s plot.
  • title (str) – The title of the card.
  • description (str) – A textual description of the card.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (dict) – Axis labels for this card’s plot. Set keys “x” and “y” to set the X and Y axis labels.
  • label_format (dict) – Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str

box_plot

class eureqa.analysis.components.box_plot.BoxPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a box plot card on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the component’s plot.
  • y_var (str) – The Y-axis variable for the component’s plot.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str

centipede

class_frequency

custom_graph

custom_plot

class eureqa.analysis.components.custom_plot.CustomPlot(datasource=None, width=None, height='400px', x_axis_label=None, y_axis_label=None, show_legend=True, zero_x_line=False, zero_y_line=False, x_tick_format=None, y_tick_format=None, guides_type='XY', analysis=None, component_id=None, component_type=None)

Represents a plot to be displayed in an analysis plot card.

By calling the plot() method multiple times on one instance of this class, multiple lines and scatter plots can be superimposed on this object.

Parameters:
  • width (str) – Set manual dimensions for the plot in “px” units (e.g. 350px). Defaults to full panel width.
  • height (str) – Set manual dimensions for the plot in “px” units. Defaults to a constant height of 400px.
  • x_axis_label (str) – The label to use on the x axis of the plot.
  • y_axis_label (str) – The label to use on the y axis of the plot.
  • show_legend (bool) – Controls whether or not a legend will be used in the plot.
  • zero_x_line (bool) – Draws a horizontal line through the origin
  • zero_y_line (bool) – Draws a vertical line through the origin
  • x_tick_format (str) – Format for x axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format
  • y_tick_format (str) – Format for y axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format
  • guides_type (str) – The type of value-guides to show when hovering over a point in the graph. Valid values are “XY”, “YY” or False. XY guides will show the x and y values for the point under the cursor. YY guides will show the x and y values of each component for the data point closest to the cursor. False will turn off value guides.
datasource

The data source providing data for this component

Returns:data source providing data for this component
delete()

Delete the Plot and any associated data which has been uploaded.

guides_type

The type of value-guides to show when hovering over a point in the graph. Valid values are “XY”, “YY” or False. XY guides will show the x and y values for the point under the cursor. YY guides will show the x and y values of each component for the data point closest to the cursor. False will turn off value guides.

Return type:str
height

The height of the plot. Represented as a string containing a valid CSS “width” attribute; for example, ‘300px’.

Return type:str
plot

Add new data to the plot with the specified options.

If a datasource is specified, x and y can be provided as expressions in terms of the variables in that datasource. Otherwise, x and y must be lists of data of identical length.

Parameters:
  • x (list) – X axis data. Either a list of input values, or if a datasource is specified, an expression in terms of that datasource’s variables.
  • y (list) – Y axis data. Either a list of input values, or if a datasource is specified, an expression in terms of that datasource’s variables.
  • datasource (DataSource) – If provided, a specific DataSource to use as a base for the variables to be plotted.
  • style (str) – A matplotlib-like style string of ‘o’ or ‘-‘ or ‘-o’ to indicate circle, line, or line-circle, respectively.
  • color (str) – CSS color.
  • line_width (int) – The width of the line, if applicable.
  • circle_radius (int) – The radius of each circle, if applicable.
  • use_in_plot_range (bool) – The chart auto-computes the x and y axis ranges based on the data for each component. If you want to add a component, but have its data not be used to compute the x and y axis ranges, set this value to False. For example, if you want to make a scatter plot, with a trend line going through it, then setting this field to False for the trend-line component will make the chart snugly fit the points, with the trend line extending beyond.
  • error_bars_upper_values (list) – Specifies the tops of error bars. Either a list of values, or if a datasource is specified, an expression in terms of that datasource’s variables. If input values is a list, then this must be a list as well.
  • error_bars_lower_values (list) – Specifies the bottoms of error bars. Either a list of values, or if a datasource is specified, an expression in terms of that datasource’s variables. If input values is a list, then this must be a list as well.
  • legend_label (str) – A string label to be used in the legend. If unspecified, this plot will not appear in the legend.
  • tooltip_template (str) – Any valid Handlebars template. The template will be provided the x and y values as “x_value” and “y_value”, so you can use these to format a tooltip for each point. For example, “<div class=”my_awesome_tooltip”>When age is {{x_value}}, salary is expected to be {{y_value}}</div>”
show_legend

Whether or not the legend should be shown

Return type:bool
upload_data(eureqa=None)

Upload the plot data to eureqa. This is required before the plot can be viewed.

Parameters:eureqa (Eureqa) – a eureqa connection
width

The width of the plot. Represented as a string containing a valid CSS “width” attribute; for example, ‘400px’.

Return type:str
x_axis_label

The label of the plot’s X axis

Return type:str
x_tick_format

Format for x axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format

Returns:str
y_axis_label

The label of the plot’s Y axis

Return type:str
y_tick_format

Format for y axis tick labels. Valid values are “date” or anything supported by D3: https://github.com/mbostock/d3/wiki/Formatting#d3_format. Defaults to our internal number format

Returns:str
zero_x_line

Whether an axis line should be shown for x=0

Return type:bool
zero_y_line

Whether an axis line should be shown for y=0

Return type:bool

double_histogram_plot

class eureqa.analysis.components.double_histogram_plot.DoubleHistogramPlot(datasource=None, axis_labels=None, label_format=None, needs_guides=None, x_var=None, y_var=None, analysis=None, component_id=None, component_type=None)

Represents a double-histogram plot component on the server.

Parameters:
  • datasource (DataSource) – The data source containing the data to be plotted.
  • x_var (str) – The X-axis variable for the card’s plot.
  • y_var (str) – The Y-axis variable for the card’s plot.
  • title (str) – The title of the card.
  • description (str) – A textual description of the card.
  • needs_guides (bool) – Whether the card needs guides.
  • axis_labels (dict) – Axis labels for this card’s plot. Set keys “x” and “y” to set the X and Y axis labels.
  • label_format (dict) – Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The title of the card
  • x_var (str) – The X-axis variable for the card’s plot
  • y_var (str) – The Y-axis variable for the card’s plot
  • needs_guides (bool) – Whether the card needs guides
  • axis_labels (XYMap) – Axis labels for this card’s plot. Set member fields “x” and “y” to set the X and Y axis labels.
  • label_format (XYMap) – Label format for this card. Set member fields “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.
axis_labels

The axis labels for this card

Returns:Axis labels for this card
Return type:self.XYMap
datasource

The data source providing data for this component

Returns:data source providing data for this card
label_format

Label format for this card. Set keys “x” and “y” to set the X and Y axis printf-style format-strings; for example, ”.3s”.

Return type:DoubleHistogramPlot.XYMap
needs_guides

Does this card need guides?

Returns:Whether this card needs guides
Return type:bool
x_var

The X variable for this card.

Returns:X variable for this card
Return type:str
y_var

The Y variable for this card.

Returns:Y variable for this card
Return type:str

download_file

class eureqa.analysis.components.download_file.DownloadFile(file_content=None, link_text=None, filename=None, analysis=None, component_id=None, component_type=None)

DownloadFile component Represents a Download link for a file within an Analysis, including the contents of that file.

Parameters:
  • file_content (str) – The contents of the file as a str()
  • link_text (str) – The text of the HTML download link in the Analysis
  • filename (str) – The name of the downloaded file
file
Return type:eureqa.analysis.analysis_file.AnalysisFile

Text of the link as rendered by the component

dropdown_layout

evaluate_model

formatted_text

class eureqa.analysis.components.formatted_text.FormattedText(format_str)

Return a formatted version of format_str, substituing format specifications with component references.

html_block

class eureqa.analysis.components.html_block.HtmlBlock(html='', analysis=None, component_id=None, component_type=None)

Represents a component containing free-form user-specified HTML.

Parameters:html (str) – Body of the card.
Variables:html (str) – Body of the card.

If you need particular styles or JS libraries, you MUST define and/or load them as part of the HtmlBlock where they are needed. Any styles or JS objects defined by Eureqa may change or be removed from release to release.

Embedding custom JavaScript (or CSS, which can contain JavaScript) from a malicious third-party source can grant that source access to your site. Only embed content from trusted sources.

html

The body of this card.

Returns:body of this card
Return type:str

interactive_explainer

class eureqa.analysis.components.interactive_explainer.InteractiveExplainer(datasource=None, search=None, solution=None, analysis=None, component_id=None, component_type=None)

Represents an interactive model explainer component on the server.

Parameters:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • search (eureqa.Search) – The search that the specified solution belongs to.
  • datasource (eureqa.DataSource) – The datasource that the specified search belongs to.
Variables:
  • solution (eureqa.Solution) – The solution that will be displayed on the card.
  • search (eureqa.Search) – The search that the specified solution belongs to.
  • datasource (eureqa.DataSource) – The datasource that the specified search belongs to.
datasource

The data source providing data for this component

Return type:eureqa.DataSource
search

The Search that is solved by this Explainer’s Solution

Return type:eureqa.Search
solution

The Solution that is being explained

Return type:eureqa.Solution

layout

magnitude_bar

model_summary

projection

projection_item

scatter_plot

tabbed_layout

table

table_builder

class eureqa.analysis.components.table_builder.TableBuilder(data, title, default_rows_per_page=20, column_names=[], striped=True, search_box_place_holder='Search')

High level API to build a table in analysis

Parameters:
  • 2Darray, pandas DataFrame or List of columns data (numpy) – table data
  • title (str) – table title
  • default_rows_per_page (int) – the default number of rows per page when the table is initially rendered
  • of str column_names (List) – names of each column
  • striped (bool) – whether or not the table rows should be rendered in alternating grey and white stripes
  • search_box_place_holder (str) – the default text shown in the search box when user hasn’t typed any search keyword

table_column

class eureqa.analysis.components.table_column.TableColumn(parent_table, col_data, col_name)

Represent a column in table

:param TableBuilder parent_table: the containing table :param A list of str or float col_data: data for this column :param str col_name: name of this column

column_name

The name of this column

filter_only

Whether this column is only for filtering, if True this column doesn’t appear in the table

rendered_values

A list of values specifying how the column is rendered

sort_values

A list of values specifying how the column is sorted

width

The width of this column

terms_in_time

text_block

titled_layout

tooltip

variable_distribution_plot

class eureqa.analysis.components.variable_distribution_plot.VariableDistributionPlot(datasource=None, variable_name=None, analysis=None, component_id=None, component_type=None)

Represents a distribution plot card on the server.

Parameters:
  • datasource (eureqa.DataSource) – The data source to which the variable belongs.
  • variable (str) – The name of the variable that will be displayed on the card.
  • title (str) – The card title.
  • description (str) – The card’s description.
  • collapse (bool) – Whether the card should default to be collapsed.
Variables:
  • title (str) – The card title.
  • datasource (str) – The datasource used by the card.
  • variable (str) – The variable plotted by the coard.
datasource

The data source providing data for this component

Returns:data source providing data for this component
variable

(Deprecated) Name of the variable to plot. For backwards compatibility.

Return type:str
variable_name

Name of the variable to plot

Return type:str

variable_histogram

variable_line_graph

class eureqa.analysis.components.variable_line_graph.VariableLineGraph(datasource=None, x_var=None, plotted_variables=None, focus_variable=None, should_center=None, should_scale=None, analysis=None, component_id=None, component_type=None)

Represents a variable line graph on the server.

Parameters:
  • datasource (eureqa.DataSource) – Data source for the component’s data
  • x_var (str) – Name of the variable to plot as the X axis
  • plotted_vars (str) – List of string-names of variables to plot.
  • focus_variable (str) – Name of the variable in ‘plotted_vars’ to bring to the foreground
  • should_center (bool) – Should the plot be centered?
  • should_scale (bool) – Should the plot scale?
  • collapse (bool) – Whether the component should default to be collapsed.
Variables:
  • title (str) – The component’s title.
  • focus_variable (str) – Focused (foreground) variable for the component. Must be a member of ~eureqa.analysis.components.ByRowPlot.plotted_variables
  • x_var (str) – Name of the variable to plot as the X axis
  • plotted_variables (list) – Variables to plot. (List of string variable names.)
  • should_center (bool) – Should the plot be centered?
  • should_scale (bool) – Should the plot scale?
datasource

The data source providing data for this component

Returns:data source providing data for this component
focus_variable

The variable that is currently in focus (in the foreground) for this component. Must be a member of ‘plotted_variables’.

Returns:focus_variable for this component
Return type:str
plotted_variables

The plotted variables for this component.

Returns:List of the names of the variables being plotted against the X axis
Return type:tuple
should_center

The should_center option for this component.

Returns:whether this plot should be centered
Return type:bool
should_scale

The should_scale option for this component.

Returns:whether this plot should be scaled
Return type:bool
x_var

The X-axis variable for this component

Returns:the name of the X-axis variable for this component
Return type:str

items

analysis_cards

eureqa.analysis_cards.AnalysisCard

alias of Card

eureqa.analysis_cards.DistributionPlotCard

alias of VariableDistributionPlot

eureqa.analysis_cards.ModelCard

alias of InteractiveExplainer

eureqa.analysis_cards.HtmlCard

alias of HtmlBlock

eureqa.analysis_cards.BoxPlotCard

alias of BoxPlot

eureqa.analysis_cards.DoubleHistogramPlotCard

alias of DoubleHistogramPlot

eureqa.analysis_cards.BinnedMeanPlotCard

alias of BinnedMeanPlot

eureqa.analysis_cards.ByRowPlotCard

alias of VariableLineGraph

eureqa.analysis_cards.Plot

alias of CustomPlot

eureqa.analysis_cards.CustomPlotCard

alias of CustomPlot

analysis_card

binned_mean_plot_card

box_plot_card

by_row_plot_card

custom_plot_card

distribution_plot_card

double_histogram_plot_card

html_card

model_card

model_evaluator_card

model_fit_by_row_plot_card

model_fit_plot_card

model_fit_separation_plot_card

model_summary_card

plot

scatter_plot_card

text_card

two_variable_plot

analysis_templates

class eureqa.analysis_templates.AnalysisTemplate(body, eureqa)

Represents an analysis template on the server.

Parameters:
  • body (dict) – Class metadata as dictionary
  • eureqa (Eureqa) – A eureqa connection
Variables:
  • name (str) – The name of the analysis template.
  • description (str) – The description of the analysis template.
  • icon_url (str) – The url of the icon for the analysis template.
  • parameters (list) – The list of parameters for the analysis template.
delete()

Delete the analysis template.

description

Analysis Template’s extended description

execute(values)

Start execution of an analysis template with given parameters.

Parameters:values (dict) – Analysis template settings an ~eureqa.analysis_templates.parameters_values.ParametersValues object. For example:
ParametersValues(
[TextParameterValue(eq, ‘example_text_param’,’This is the text input value.’),
DataSourceParameterValue(eq, ‘123’, ‘SimpleDataSource’,
{VariableParameterValue(eq, ‘345’, ‘value 345’)})],

)

get_executions()

Get all executions of the analysis template.

get_module(output_filename)

Download the Python code which implementes this analysis template, as a .zip package, to the specified file on the local filesystem. Returns the main_module’s name

Parameters:output_filename (str) – The filename to be used for the resulting zip file containing the analysis template code.
name

Analysis Template’s name

parameters

Parameters object representing this template

set_module(main_module_name, module_fs_path, ignore_files=None, additional_modules_paths=[])

Set the the python module and function that specifies the execution of this analysis template.

Parameters:
  • main_module_name (str) – Absolute Python-import name of the main module to run. For example, “example_module”.
  • module_fs_path (str) – Filesystem path where the module containing the function lives. For example, “C:Userseureqaexample_module”. If omitted, this is inferred by importing the function above and taking the parent directory of the file that contains it.
  • ignore_files (list[str]) – List of names of files that, if encountered, will not be uploaded to the Eureqa server.
  • additional_modules_paths (list) – List of other directory names, that, if encountered, will be uploaded to the Eureqa server as well
class eureqa.analysis_templates.ComboBoxParameter(id, label, items)

Combo box parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • items (list[str]) – The items to populate the combo box with.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • items (list[str]) – The items to populate the combo box with.
class eureqa.analysis_templates.ComboBoxParameterValue(eureqa, id, value)

Combo box parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • eureqa (Eureqa) – A eureqa connection
  • value (str) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
class eureqa.analysis_templates.DataFileParameter(id, label, description, filetypes)

Data file parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • description (str) – A description that will be shown in UI.
  • filetypes (list[str]) – The list of accepted filetypes.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • description (str) – A description that will be shown in UI.
  • filetypes (list[str]) – The list of accepted filetypes.
class eureqa.analysis_templates.DataFileParameterValue(eureqa, id, value, object_store_bucket, object_store_key)

Combo box parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • object_store_bucket (int) – The specific collection in the object store.
  • object_store_key (str) – The reference into the object store bucket for this id.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
class eureqa.analysis_templates.DataSourceParameter(id, label, variables)

Data source parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • variables (list[VariableParameter]) – The parameters for variables that belong to the data set described by this parameter.
class eureqa.analysis_templates.DataSourceParameterValue(eureqa, id, value, variables)

Data source parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • variables (list[VariableParameterValue]) – The parameters values for variables that belong to this data source.
class eureqa.analysis_templates.Execution(body, template_id, eureqa)

Represents an analysis template execution on the server.

Parameters:
  • body (dict) – Class metadata as dictionary
  • template_id (str) – The id of the analysis_template the execution belongs to.
  • eureqa (Eureqa) – A eureqa connection.
Variables:
  • template_id (str) – The id of the analysis_template the execution belongs to.
  • analysis_id (str) – The id of the analysis the execution belongs to.
  • state (str) – The current state of the execution.
  • parameters (list) – The list of parameter values for the execution.
  • progress_updates (list) – The list of updates for the execution.
get_analysis()

Retrieves the analysis that belongs to the execution.

get_analysis_template()

Retrieves the analysis that belongs to the execution.

progress_updates

Get all progress updates for an execution of an analysis template.

report_fatal_error(error)

Notifies the server that an error occurred during the execution and terminates the script execution.

Parameters:error (str) – The error that occurred during the execution.
report_validation_result(type, message=None, details=None, parameter_id=None)

Report an info/warning/error message about the specified parameter to be shown to the user in validation review

Parameters:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The result message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to
update_progress(message)

Create a progress update for an execution of an analysis template.

Parameters:message (str) – The progress message
validation_results

Get all validation results for the execution of an analysis template.

class eureqa.analysis_templates.NumericParameter(id, label, min=None, max=None, require_int=False)

Numeric parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • min (float) – The minimum value to allow.
  • max (float) – The maximum value to allow.
  • reqire_int (bool) – Indicates that the number should be an integer.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • min (float) – The minimum value to allow.
  • max (float) – The maximum value to allow.
  • reqire_int (bool) – Indicates that the number should be an integer.
class eureqa.analysis_templates.NumericParameterValue(eureqa, id, value)

Numeric parameter value description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (float) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (float) – The parameter value.
class eureqa.analysis_templates.Parameters(parameters=None)

Analysis template parameters definition

Parameters:parameters (list[Parameter]) – The list of parameters for the template, whether text, variable or datasource.
class eureqa.analysis_templates.ParametersValues(parameters=None)

Analysis template parameters values

Parameters:parameters (list[Parameter]) – The list of parameter values for the template, whether text, variable or datasource value.
class eureqa.analysis_templates.ProgressUpdate(body)

Represents an analysis template execution progress update on the server.

Parameters:

body (dict) – Class metadata as dictionary

Variables:
  • message (str) – The the message about the execution’s status.
  • time_stamp (datetime) – The time the progress update was created.
class eureqa.analysis_templates.TextParameter(id, label, text_multiline=False)

Text parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • text_multiline (bool) – Indicates that the text should be split across multiple lines.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
class eureqa.analysis_templates.TextParameterValue(eureqa, id, value, text_multiline=False)

Text parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • text_multiline (bool) – Whether to display as multiline text
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
class eureqa.analysis_templates.TopLevelModelParameter(id, label, custom_disabled)

TopLevelModel parameter description for analysis template. For selecting a single model (either an existing one within a datasource and search, or a custom one).

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • custom_disabled (bool) – Whether to block the user from setting a custom expression
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • custom_disabled (bool) – Whether to block the user from setting a custom expression
class eureqa.analysis_templates.TopLevelModelParameterValue(eureqa, id, value, datasource_id, search_id, solution_id)

TopLevelModel parameter value for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • datasource_id (str) – The parameter value for the datasource the expression belongs to.
  • search_id (str) – The parameter value for the search the expression belongs to.
  • solution_id (str) – The parameter value for the solution the expression belongs to.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
class eureqa.analysis_templates.VariableParameter(id, label)

Variable parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
class eureqa.analysis_templates.VariableParameterValue(eureqa, id, value)

Variable parameter value for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
class eureqa.analysis_templates.ParameterValidationResult(type, message=None, details=None, parameter_id=None)

Represents an analysis template execution validation result to the server

Parameters:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The the message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to
Variables:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The the message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to

analysis_template

class eureqa.analysis_templates.analysis_template.AnalysisTemplate(body, eureqa)

Represents an analysis template on the server.

Parameters:
  • body (dict) – Class metadata as dictionary
  • eureqa (Eureqa) – A eureqa connection
Variables:
  • name (str) – The name of the analysis template.
  • description (str) – The description of the analysis template.
  • icon_url (str) – The url of the icon for the analysis template.
  • parameters (list) – The list of parameters for the analysis template.
delete()

Delete the analysis template.

description

Analysis Template’s extended description

execute(values)

Start execution of an analysis template with given parameters.

Parameters:values (dict) – Analysis template settings an ~eureqa.analysis_templates.parameters_values.ParametersValues object. For example:
ParametersValues(
[TextParameterValue(eq, ‘example_text_param’,’This is the text input value.’),
DataSourceParameterValue(eq, ‘123’, ‘SimpleDataSource’,
{VariableParameterValue(eq, ‘345’, ‘value 345’)})],

)

get_executions()

Get all executions of the analysis template.

get_module(output_filename)

Download the Python code which implementes this analysis template, as a .zip package, to the specified file on the local filesystem. Returns the main_module’s name

Parameters:output_filename (str) – The filename to be used for the resulting zip file containing the analysis template code.
name

Analysis Template’s name

parameters

Parameters object representing this template

set_module(main_module_name, module_fs_path, ignore_files=None, additional_modules_paths=[])

Set the the python module and function that specifies the execution of this analysis template.

Parameters:
  • main_module_name (str) – Absolute Python-import name of the main module to run. For example, “example_module”.
  • module_fs_path (str) – Filesystem path where the module containing the function lives. For example, “C:Userseureqaexample_module”. If omitted, this is inferred by importing the function above and taking the parent directory of the file that contains it.
  • ignore_files (list[str]) – List of names of files that, if encountered, will not be uploaded to the Eureqa server.
  • additional_modules_paths (list) – List of other directory names, that, if encountered, will be uploaded to the Eureqa server as well

combo_box_parameter

class eureqa.analysis_templates.combo_box_parameter.ComboBoxParameter(id, label, items)

Combo box parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • items (list[str]) – The items to populate the combo box with.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • items (list[str]) – The items to populate the combo box with.

combo_box_parameter_value

class eureqa.analysis_templates.combo_box_parameter_value.ComboBoxParameterValue(eureqa, id, value)

Combo box parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • eureqa (Eureqa) – A eureqa connection
  • value (str) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.

data_file_parameter

class eureqa.analysis_templates.data_file_parameter.DataFileParameter(id, label, description, filetypes)

Data file parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • description (str) – A description that will be shown in UI.
  • filetypes (list[str]) – The list of accepted filetypes.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • description (str) – A description that will be shown in UI.
  • filetypes (list[str]) – The list of accepted filetypes.

data_file_parameter_value

class eureqa.analysis_templates.data_file_parameter_value.DataFileParameterValue(eureqa, id, value, object_store_bucket, object_store_key)

Combo box parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • object_store_bucket (int) – The specific collection in the object store.
  • object_store_key (str) – The reference into the object store bucket for this id.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.

data_source_parameter

class eureqa.analysis_templates.data_source_parameter.DataSourceParameter(id, label, variables)

Data source parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • variables (list[VariableParameter]) – The parameters for variables that belong to the data set described by this parameter.

data_source_parameter_value

class eureqa.analysis_templates.data_source_parameter_value.DataSourceParameterValue(eureqa, id, value, variables)

Data source parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • variables (list[VariableParameterValue]) – The parameters values for variables that belong to this data source.

execution

class eureqa.analysis_templates.execution.Execution(body, template_id, eureqa)

Represents an analysis template execution on the server.

Parameters:
  • body (dict) – Class metadata as dictionary
  • template_id (str) – The id of the analysis_template the execution belongs to.
  • eureqa (Eureqa) – A eureqa connection.
Variables:
  • template_id (str) – The id of the analysis_template the execution belongs to.
  • analysis_id (str) – The id of the analysis the execution belongs to.
  • state (str) – The current state of the execution.
  • parameters (list) – The list of parameter values for the execution.
  • progress_updates (list) – The list of updates for the execution.
get_analysis()

Retrieves the analysis that belongs to the execution.

get_analysis_template()

Retrieves the analysis that belongs to the execution.

progress_updates

Get all progress updates for an execution of an analysis template.

report_fatal_error(error)

Notifies the server that an error occurred during the execution and terminates the script execution.

Parameters:error (str) – The error that occurred during the execution.
report_validation_result(type, message=None, details=None, parameter_id=None)

Report an info/warning/error message about the specified parameter to be shown to the user in validation review

Parameters:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The result message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to
update_progress(message)

Create a progress update for an execution of an analysis template.

Parameters:message (str) – The progress message
validation_results

Get all validation results for the execution of an analysis template.

numeric_parameter

class eureqa.analysis_templates.numeric_parameter.NumericParameter(id, label, min=None, max=None, require_int=False)

Numeric parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • min (float) – The minimum value to allow.
  • max (float) – The maximum value to allow.
  • reqire_int (bool) – Indicates that the number should be an integer.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • min (float) – The minimum value to allow.
  • max (float) – The maximum value to allow.
  • reqire_int (bool) – Indicates that the number should be an integer.

numeric_parameter_value

class eureqa.analysis_templates.numeric_parameter_value.NumericParameterValue(eureqa, id, value)

Numeric parameter value description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (float) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (float) – The parameter value.

parameter

class eureqa.analysis_templates.parameter.Parameter(id, label, _type)

Base class for all analysis templates parameters

Parameters:
  • id (str) – The unique identifier for this Parameter.
  • label (str) – The human-readable label to be associated with this Parameter.

parameters

class eureqa.analysis_templates.parameters.Parameters(parameters=None)

Analysis template parameters definition

Parameters:parameters (list[Parameter]) – The list of parameters for the template, whether text, variable or datasource.

parameters_values

class eureqa.analysis_templates.parameters_values.ParametersValues(parameters=None)

Analysis template parameters values

Parameters:parameters (list[Parameter]) – The list of parameter values for the template, whether text, variable or datasource value.

parameter_validation_result

class eureqa.analysis_templates.parameter_validation_result.ParameterValidationResult(type, message=None, details=None, parameter_id=None)

Represents an analysis template execution validation result to the server

Parameters:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The the message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to
Variables:
  • type (str) – If this result is INFO, WARNING, or ERROR
  • message (str) – The the message
  • details (str) – (optional) Detailed message about the result
  • parameter_id (str) – (optional) the analysis template parameter that this progress update refers to

parameter_value

class eureqa.analysis_templates.parameter_value.ParameterValue(id, value, _type)

Base class for all analysis templates parameters values

Parameters:
  • id (str) – The unique identifier for this parameter.
  • value (str) – The value of this parameter.

progress_update

class eureqa.analysis_templates.progress_update.ProgressUpdate(body)

Represents an analysis template execution progress update on the server.

Parameters:

body (dict) – Class metadata as dictionary

Variables:
  • message (str) – The the message about the execution’s status.
  • time_stamp (datetime) – The time the progress update was created.

runner

class eureqa.analysis_templates.runner.analysis_template_runner

Bootstrapper for analysis templates. Sets up the environment required to invoke the analysis template and then invokes it.

get_analysis_module_from_template(eureqa, template)

Retrieves the bytes that represent an analysis template from the eureqa server (as base64-encoded .zip file module); then function, raising an Exception if an error occurs.

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • template (Template) – The Template object containing the desired analysis.
run_args(arguments)

Run a template with the provided arguments.

Parameters:arguments (str) – Command line-style argument string.

analysis_template_runner

exception eureqa.analysis_templates.runner.analysis_template_runner.LocalFatalException

Class that represents fatal exceptions from the local runner

class eureqa.analysis_templates.runner.analysis_template_runner.Local_analysis_template_execution(eureqa, parameters=None)

Stubs out the analysis_template_execution to provide the same interface while running locally.

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • parameters (str) – JSON string of parameters.
report_fatal_error(error)

Report a fatal error of the running analysis.

Parameters:error (str) – Message to print indicating progress.
throw_if_fatal_exception()

Throw any error encountered as a fatal exception

update_progress(message)

Update progress of the running analysis.

Parameters:message (str) – Message to print indicating progress.
class eureqa.analysis_templates.runner.analysis_template_runner.analysis_template_runner

Bootstrapper for analysis templates. Sets up the environment required to invoke the analysis template and then invokes it.

get_analysis_module_from_template(eureqa, template)

Retrieves the bytes that represent an analysis template from the eureqa server (as base64-encoded .zip file module); then function, raising an Exception if an error occurs.

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • template (Template) – The Template object containing the desired analysis.
run_args(arguments)

Run a template with the provided arguments.

Parameters:arguments (str) – Command line-style argument string.

client

eureqa.analysis_templates.runner.client.main(argv)

Handle executing analysis template code without actually uploading it to the server. Mostly a wrapper around `eureqa.analysis_templates.runner.analysis_template_runner. The latter is called directly by the server; this one is a little more user-friendly and respects eureqa_config.json.

Parameters:argv (list) – Arguments

text_parameter

class eureqa.analysis_templates.text_parameter.TextParameter(id, label, text_multiline=False)

Text parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • text_multiline (bool) – Indicates that the text should be split across multiple lines.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.

text_parameter_value

class eureqa.analysis_templates.text_parameter_value.TextParameterValue(eureqa, id, value, text_multiline=False)

Text parameter description for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • text_multiline (bool) – Whether to display as multiline text
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.

top_level_model_parameter

class eureqa.analysis_templates.top_level_model_parameter.TopLevelModelParameter(id, label, custom_disabled)

TopLevelModel parameter description for analysis template. For selecting a single model (either an existing one within a datasource and search, or a custom one).

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • custom_disabled (bool) – Whether to block the user from setting a custom expression
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
  • custom_disabled (bool) – Whether to block the user from setting a custom expression

top_level_model_parameter_value

class eureqa.analysis_templates.top_level_model_parameter_value.TopLevelModelParameterValue(eureqa, id, value, datasource_id, search_id, solution_id)

TopLevelModel parameter value for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
  • datasource_id (str) – The parameter value for the datasource the expression belongs to.
  • search_id (str) – The parameter value for the search the expression belongs to.
  • solution_id (str) – The parameter value for the solution the expression belongs to.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.

variable_parameter

class eureqa.analysis_templates.variable_parameter.VariableParameter(id, label)

Variable parameter description for analysis template

Parameters:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.
Variables:
  • id (str) – The id of the parameter that will be passed together with its value to an analysis script.
  • label (str) – The parameter label that will be shown in UI.

variable_parameter_value

class eureqa.analysis_templates.variable_parameter_value.VariableParameterValue(eureqa, id, value)

Variable parameter value for analysis template

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.
Variables:
  • id (str) – The id of the parameter.
  • value (str) – The parameter value.

data_source

class eureqa.data_source.DataSource(eureqa, body)

Represents an interface to a data source on the server

Parameters:
  • eureqa (Eureqa) – A eureqa connection.
  • body (dict) – Class metadata as dictionary.
Variables:
  • name (str) – The data source name.
  • number_columns (int) – The number of columns in the data source.
  • number_rows (int) – The number of rows (variables) in the data source.

Creates a new search with input as a SearchSettings object.

Parameters:search_settings (SearchSettings) – the settings for creating a new search.
Returns:A Search object which represents a newly create search on the server.
Return type:Search
create_variable(expression, variable_name)

Adds a new variable to the data_source with values from evaluating the given expression.

Parameters:
  • expression (str) – the expression to evaluate to fill in the values
  • variable_name (str) – what to name the new variable
delete()

Deletes the data source from the server.

Raises:Exception – If the data source is already deleted.
download_data_file(file_path)

Downloads the originally uploaded data file from the server.

Parameters:file_path (str) – the filepath at which to save the data
get_searches()

Retrieves from the server a list of searches associated with the data source.

Returns:The list of all searches associated with the data source.
Return type:list of Search
get_variable_details(variable_name)

Retrieves the details for the requested variable from the data_source.

Parameters:variable_name (str) – the name of the variable to get the details for
Returns:The object representing the variable details
Return type:VariableDetails
get_variables()

Retrieves from the server a list of variables in a data set.

Returns:A list of the same variables as visible in Eureqa UI. Including all derived variables.
Return type:list of str

data_splitting

class eureqa.data_splitting.DataSplitting(shuffle, training_data_percentage=None, validation_data_percentage=None, training_selection_expression=None, validation_selection_expression=None, training_selection_expression_type=None, validation_selection_expression_type=None)

Represents a data splitting settings for the genetic algorithm.

Parameters:
  • shuffle (bool) – Indicates whether data are shuffled or not before the training.
  • training_data_percentage (float) – The percentage of data used for training.
  • validation_data_percentage (float) – The percentage of data used for validation.
  • training_selection_expression (str) – The expression used for selecting the training set.
  • validation_selection_expression (str) – The expression used for selecting the validation set.
  • training_selection_expression_type (str) – The type of expression used for selecting the training set. (‘EXPRESSION’,’VARIABLE’,None)
  • validation_selection_expression_type (str) – The type of expression used for selecting the validation set. (‘EXPRESSION’,’VARIABLE’,None)
Variables:
  • shuffle (bool) – Indicates whether data are shuffled or not before the training.
  • training_data_percentage (float) – The percentage of data used for training.
  • validation_data_percentage (float) – The percentage of data used for validation.
  • training_selection_expression (str) – The expression used for selecting the training set.
  • validation_selection_expression (str) – The expression used for selecting the validation set.
  • training_selection_expression_type (str) – The type of expression used for selecting the training set. (‘EXPRESSION’,’VARIABLE’,None)
  • validation_selection_expression_type (str) – The type of expression used for selecting the validation set. (‘EXPRESSION’,’VARIABLE’,None)

error_metric

class eureqa.error_metric.ErrorMetrics(mean_absolute_error=None, r2_goodness_of_fit=None, correlation_coefficient=None, maximum_absolute_error=None, signed_difference_between_lhs_and_rhs=None, area_under_roc_error=None, log_loss_error=None, rank_correlation_1_minus_r=None, mean_square_error=None, mean_squared_error_auc_hybrid=None)

Stores the value of the error of an expression as compared to a model by a variety of different types of error-evaluation methods.

Parameters:
  • mean_absolute_error (float) – Mean Absolute Error
  • r2_goodness_of_fit (float) – R^2 Goodness of Fit
  • correlation_coefficient (float) – Correlation Coefficient
  • maximum_absolute_error (float) – Maximum Absolute Error
  • signed_difference_between_lhs_and_rhs (float) – Signed Difference Between LHS and RHS
  • area_under_roc_error (float) – Area Under ROC Curve
  • log_loss_error (float) – Log Loss Error
  • rank_correlation_1_minus_r (float) – Rank Correlation
  • mean_square_error (float) – Mean Squared Error
  • mean_squared_error_auc_hybrid (float) – Mean Squared Error for Classification
Variables:
eureqa.error_metric.area_under_roc_error()

Area Under ROC Curve error metric

eureqa.error_metric.correlation_coefficient()

Correlation Coefficient error metric

eureqa.error_metric.log_loss_error()

Log Loss Error error metric

eureqa.error_metric.maximum_absolute_error()

Maximum Absolute Error error metric

eureqa.error_metric.mean_absolute_error()

Mean Absolute Error error metric

eureqa.error_metric.mean_square_error()

Mean Squared Error error metric

eureqa.error_metric.mean_squared_error_auc_hybrid()

Mean Squared Error for Classification error metric

eureqa.error_metric.r2_goodness_of_fit()

R^2 Goodness of Fit error metric

eureqa.error_metric.rank_correlation_1_minus_r()

Rank Correlation error metric

eureqa.error_metric.signed_difference_between_lhs_and_rhs()

Signed Difference Between LHS and RHS error metric

eureqa

class eureqa.eureqa.Eureqa(url='https://rds.nutonian.com', user_name=None, password=None, organization=None, interactive_mode=False, save_credentials=False, verify_ssl_certificate=True, verify_version=True, verbose=False, retries=5, session_key=None, timeout_seconds=None, key=None)

Represents an interface to the Eureqa server. All interactions with the server should start from this class.

Variables:

search_templates (Solution) – Provides access to predefined search templates.

Parameters:
  • url (str) – The URL of the eureqa server. It should be the same URL as used to access the web UI.
  • user_name (str) – The user name to login into the server. It should be the same user name as used to login into the web UI. If the user name is not provided and the interactive mode is enabled, the user name will be requested during the script execution.
  • password (str) – The password. If the password is not provided and the interactive mode is enabled, the password will be requested during the script execution.
  • organization (str) – The name of the organization. All request to API will be executed in the context of this organization. If the organization name is not provided and the user is assigned to only one organization, then that organization will be used by default.
  • interactive_mode (bool) – If set to True, enables interactive mode. In the interactive mode the script will request user name, password, and potentially other information if it is not provided or incorrect. If set to False (default), throws an exception if a login or password is incorrect, or if the two factor authentication is enabled. This is the default behaviour which prevents scripts from indefinitely waiting for the user input if they are executed automatically by a CRON job or a Windows Scheduler task.
  • save_credentials (bool) – If set to True, saves user name and password to the ‘.eureqa_passwd’ in the user directory. If after that any script on the same machine is trying to connect to the same server and does not provide credentials, it reuses the saved credentials. It does not save a temporary password when the two-factor authentication is enabled. When used with the two-factor authentication, the interactive_mode parameter should also be enabled.
  • verify_ssl_certificate (bool) – If set to False will not verify SSL certificate authenticity while connecting to Eureqa.
  • verify_version (bool) – If set to False will allow to use Python API library with incompatible version of Eureqa. Should only be used for the diagnostic purpose.
  • verbose (bool) – If set to True will print to the console the detailed information for each request to the server. Should only be used for the diagnostic purpose.
  • retries (int) – The number of attempts to establish a session before an Exception is raised
  • session_key (str) – The session identifier.
  • timeout_seconds (int) – The HTTP connection and transmission timeout. Any request to Eureqa API will abort with an exception if it takes more time, than set in the timeout, to either connect to the server or to receive a next data package.
  • key (str) – Authentication key. Provide either this field or password.
Raises:

Exception – If the authentication fails or cannot be completed.

compute_error_metrics(datasource, target_variable, model_expression, template_search=None, variable_options=[], row_weight='1.0', row_weight_type='uniform')

Compute the eureqa.error_metric.ErrorMetrics for the specified model, against the specified target_variable

Parameters:
  • datasource (DataSource) – DataSource to compute error against
  • target_variable (str) – Variable (or expression) to compare the model to
  • model_expression (str) – Model whose error is to be computed
  • template_search (Search) – If specified, inherit variable options from the specified search. Values specified in :variable_options: take precedence over values in this search; use it for finer-grained control instead of or on top of this argument.
  • variable_options (VariableOptionsDict) – Override any default behavior for the specified variables. If the data contains nulls and no null-handling policy is specified, this method will return an error. A list of eureqa.variable_options.VariableOptions may also be provided.
  • row_weight (str) – Expression to compute the weight of a row (how much that row contributes to the computed error)
  • row_weight_type (str) – The type of expression to use to compute row weight (uniform, target_frequency, variable, or custom_expr)
Returns:

The computed error metrics

Return type:

ErrorMetrics

create_analysis(name, description=None)

Creates an analysis.

Parameters:
  • name (str) – The analysis name. It will be used as the Analysis title.
  • description (str) – The analysis description.
Returns:

An Analysis object that represents a newly created data source on the server.

Return type:

Analysis

create_analysis_template(name, description, parameters, icon=None)

Create a new Analysis Template on the Eureqa server.

Parameters:
  • name (str) – The analysis template’s name. Will be used to identify the template.
  • description (str) – The analysis template’s description. Will be used where more space is available for an expanded description.
  • parameters (Parameters) – Object describing the parameters that a user must fill in via the UI in order to specify the template’s behavior
  • icon (str) – The path to an icon to use in the UI for this analysis.
Returns:

An AnalysisTemplate object representing the template on the server

Return type:

AnalysisTemplate

create_data_source(name, file_or_path)

Creates a new data source on the server.

Uploads data and performs all the same preproccessing that happen when a new data set is created through the UI.

Parameters:
  • name (str) – A name for the new data source.
  • file_or_path (str) – A path to a local CSV file with data for the data source. It can be either an absolute path or path relative to the current working directory. Alternatively, a Python file-like object.
Returns:

A DataSource object that represents a newly created data source on the server.

Return type:

DataSource

Raises:

Exception – If data source with the same name already exists and get_existing is set to False.

evaluate_expression(datasource, expressions, template_search=None, variable_options=[])

Evaluates the provided expression against the specified datasource. Returns the value of the evaluated computation.

Example:

values = eureqa.evaluate_expression([‘x’,’y’,’x^2’]) # where

values[‘x’] –> [1,2,3,4]

values[‘y’] –> [5,6,7,8]

values[‘x^2’] –> [1,4,9,16]

data = pandas.DataFrame(values) # convert to pandas.DataFrame

Parameters:
  • datasource (DataSource) – DataSource to perform the computation against
  • expressions (str) – If only one expression is to be evaluated, that expression. If multiple expressions are to be evaluated, a list of those expressions.
  • template_search (Search) – If specified, inherit variable options from the specified search. Values specified in :variable_options: take precedence over values in this search; use it for finer-grained control instead of or on top of this argument.
  • variable_options (VariableOptionsDict) – Override default variable options directly for particular variables. Set interpretation of NaN values, outliers, etc. default behavior is to make no changes to the original data. By default, missing values are not filled; missing values in input data may result in missing values in corresponding computed values. A list of eureqa.variable_options.VariableOptions may also be provided.
get_all_analysis_templates()

Get a list of all Analysis Template objects currently available to this connection

Return type:list of AnalysisTemplate
get_all_data_sources()

Get all data sources from the server

Returns:A list of DataSource objects for all data sources within the organization.
get_analyses()

Return the list of all analyses from the server.

Return type:list of Analysis
get_analysis(analysis_id)

Return a specific analysis from the server, by id

Parameters:analysis_id (str) – The id of the analysis to return
Return type:Analysis
get_data_source(data_source_name)

Get a data source by its name.

Searches on the server for a data source given its name.

Parameters:data_source_name (str) – The name of the data source.
Returns:A DataSource object if such data source exists, otherwise None.
Return type:DataSource
get_data_source_by_id(data_source_id)

Get a data source by its id.

Searches on the server for a data source given its id.

Parameters:data_source_id (str) – The ID of the data source.
Returns:A DataSource object if such data source exists, otherwise None.
Return type:DataSource
search_templates

Return all Search Templates available to the current connection

Return type:SearchTemplates
class eureqa.eureqa.EureqaLocal(instance=1)

Represents an interface to the Eureqa Local server.

Works exactly the same as Eureqa, its parent class, except as documented.

Parameters:instance (int) – Instance number. Default, 1, points to the first Eureqa launched on the machine. The second is 2, etc. Use this instead of the ‘url’ argument on the parent class.

All constructor arguments for the Eureqa class are also supported.

html

button

class eureqa.html.button.Button(title)

BETA An HTML button inside an HtmlCard

Parameters:title (str) – Title of the card
class Events

Constants that identify the types of events that can trigger an action

Button.add_action(card_action, args=None, kwargs=None, event='click')

Add an action to this button, to be performed when the specified event happens

Parameters:
  • card_action (instancemethod) – Method on an analysis-card instance to invoke. For example, card.replace.
  • args (tuple) – Arguments to the card_action method
  • kwargs (dict) – Keyword arguments to the card_action method
  • event (str) – Event that triggers this action
Button.add_replace_action(target_card, replacement_card, event='click')

Add a ‘Replace’ action to the specified card. Equivalent to add_action(target_card.replace, (replacement_card,), event=event).

Parameters:
  • target_card (eureqa.analysis_card.AnalysisCard) – Card to be replaced
  • replacement_card (eureqa.analysis_card.AnalysisCard) – Card to replace target_card with
  • event (Events) – Event to trigger the replacement
Button.to_html(html_tag='a')

Render this button as an HTML tag

For example: to_html(‘Go!’, html_tag=’button’, style=’color: blue;’) would return “<button style=’color: blue;’ (...)>Go!</button>”

Parameters:
  • html_tag (str) – Tag name. For example, ‘a’, ‘input’, ‘button’, ‘div’
  • **kwargs – Tag parameters. For example, “style=’color: blue;’”
Returns:

HTML string representation of this button

colors

math_block

Available math blocks:

class eureqa.math_block.MathBlock

Represents a building block of a mathematical model. It is created during the construction of a eureqa.search.Search or eureqa.search_settings.SearchSettings object.

Parameters:
  • name (str) – The name
  • complexity (int) – The complexity weight of the operations. The algorithm will try to avoid operations with higher complexity.
  • notation (str) – The actual notation of the model block
complexity

MathBlock’s complexity (settable)

disable()

Don’t allow this MathBlock to be used for modeling

enable(complexity=None)

Allow this MathBlock to be used for modeling

Parameters:complexity (int) – The level of complexity of the MathBlock
enabled

Can this MathBlock be used for modeling?

name

MathBlock’s name (read-only)

math_block_set

class eureqa.math_block_set.MathBlockSet

Tracks which known MathBlock objects are currently available in the system

Usage:

>>> # enable the pow building block and set its complexity to 3
>>> math_blocks.pow.enable(complexity=3)
>>> # disable the pow building block in searches
>>> math_blocks.pow.disable()
>>> # set the complexity of log to 5 (do not change enabled or disabled)
>>> math_blocks.log.complexity = 5
>>>
>>> # enable a list of blocks
>>> for block in [settings.math_blocks.pow, settings.math_blocks.exp]:
>>>     block.enable(complexity=3)
>>>
>>> # Get a list of enabled blocks w/ complexity
>>> for block in settings.math_blocks:
>>>     if block.enabled:
>>>          print block.complexity
abs

Absolute Value math block

Return type:MathBlock
acos

Arccosine math block

Return type:MathBlock
acosh

Inverse Hyperbolic Cosine math block

Return type:MathBlock
add

Addition math block

Return type:MathBlock
and_op

Logical And math block

Return type:MathBlock
asin

Arcsine math block

Return type:MathBlock
asinh

Inverse Hyperbolic Sine math block

Return type:MathBlock
atan

Arctangent math block

Return type:MathBlock
atanh

Inverse Hyperbolic Tangent math block

Return type:MathBlock
ceiling

Ceiling math block

Return type:MathBlock
complementary_error

Complementary Error Function math block

Return type:MathBlock
const

Returns math block for Constant

Return type:MathBlock
cos

Cosine math block

Return type:MathBlock
cosh

Hyperbolic Cosine math block

Return type:MathBlock
delay

Delayed Variable math block

Return type:MathBlock
div

Division math block

Return type:MathBlock
equal

Equal-To math block

Return type:MathBlock
error

Error Function math block

Return type:MathBlock
exp

Exponential math block

Return type:MathBlock
fact

Factorial math block

Return type:MathBlock
floor

Floor math block

Return type:MathBlock
gauss

Gaussian Function math block

Return type:MathBlock
greater

Greater-Than math block

Return type:MathBlock
greater_equal

Greater-Than-Or-Equal math block

Return type:MathBlock
if_op

If-Then-Else math block

Return type:MathBlock
int_const

Integer Constant math block

Return type:MathBlock
less

Less-Than math block

Return type:MathBlock
less_equal

Less-Than-Or-Equal math block

Return type:MathBlock
log

Natural Logarithm math block

Return type:MathBlock
logistic

Logistic Function math block

Return type:MathBlock
max

Maximum math block

Return type:MathBlock
min

Minimum math block

Return type:MathBlock
mod

Modulo math block

Return type:MathBlock
mult

Multiplication math block

Return type:MathBlock
neg

Negation math block

Return type:MathBlock
not_op

Logical Not math block

Return type:MathBlock
or_op

Logical Or math block

Return type:MathBlock
pow

Power math block

Return type:MathBlock
round

Round math block

Return type:MathBlock
sign

Sign Function math block

Return type:MathBlock
simple_moving_average

Simple Moving Average math block

Return type:MathBlock
simple_moving_median

Simple Moving Median math block

Return type:MathBlock
sin

Sine math block

Return type:MathBlock
sinh

Hyperbolic Sine math block

Return type:MathBlock
sqrt

Square Root math block

Return type:MathBlock
step

Step Function math block

Return type:MathBlock
sub

Subtraction math block

Return type:MathBlock
tan

Tangent math block

Return type:MathBlock
tanh

Hyperbolic Tangent math block

Return type:MathBlock
two_args_atan

Two-Argument Arctangent math block

Return type:MathBlock
var

Input Variable math block

Return type:MathBlock
weighted_moving_average

Weighted Moving Average math block

Return type:MathBlock
xor

Logical Xor math block

Return type:MathBlock

search

class eureqa.search.Search(body, eureqa)

Represents a search on the server. It should be created using the eureqa.data_source.DataSource.create_search() method.

Parameters:
  • eureqa (Eureqa) – A eureqa connection
  • body (dict) – Class metadata as a dictionary
Variables:
create_solution(solution_string, use_all_data=False)

Creates a custom solution for the search. Use this if you want to compute error metrics and other statistics of a specified expression. It is also useful to compare how well a known model does against one found by Eureqa

Parameters:
  • solution_string (string) – the right hand side of the expression.
  • use_all_data (bool) – whether to use all data or just validation data when calculating the metrics for the solution.
Return type:

Solution

delete()

Deletes the search from the server.

Raises:Exception – search is already deleted.
evaluate_expression(expressions)

Deprecated. Use Eureqa.evaluate_expression() instead

Parameters:expressions (str) – Deprecated. Do not use.
get_best_solution()

Retrieves from the server the best solution found so far.

Return type:Solution
get_data_source()

Retrieves from the server the data source information for this search.

Return type:DataSource
get_most_accurate_solution()

Retrieves from the server the most accurate solution found so far.

Return type:Solution
get_solutions()

Retrieves from the server the list of solutions found so far.

This method can be called while the search is running to check what searches are already found and make a decision whether continue the search.

Returns:list of Solution objects.
Return type:list
is_running

Indicates if the search currently running.

Return type:bool
rename(new_search_name)

Change search display name.

Parameters:new_search_name (std) – New search name.
stop()

Stops running the search.

submit(time_seconds)

Submit the search to the server to run for the specified amount of time.

This method does not guarantee to start the search immediately. The search can be queued for some time before it will start producing any results.

Parameters:time_seconds (int) – The maximum amount of time to run the search. The server will stop running the search once the running time will reach this limit.
wait_until_done(show_progress=False, poll_seconds=5, print_callback=None)

Waits until the search stops running.

Parameters:
  • show_progress (bool) – whether to print the search progress while waiting.
  • poll_seconds (int) – number of seconds to wait between checking progress.
  • print_callback (function) – method to invoke to print the progress (sys.stdout.write by default).

search_settings

Templates for search settings:

class eureqa.search_settings.SearchSettings

A set of settings which should be passed into create_search() Use one of the templates from search_templates() to create an instance of this class.

Variables:
  • name (str) – The name of the search.
  • target_variable (str) – The target variable.
  • input_variables (list) – The list of input variables.
  • math_blocks (list) – The list of the MathBlock objects which represents mathematical operations allowed to be used by the search algorithm.
  • data_splitting (DataSplitting) – The data splitting settings for the search algorithm.
  • error_metric (str) – One of the error metrics from eureqa.error_metric.
  • maximum_history_absolute_rows (int) – The maximum number of rows that can be used in range based functions.
  • prior_solutions (list) – The list of prior solutions.
  • row_weight (str) – The row weight expression.
  • row_weight_type (str) – The row weight type expression. The default, ‘uniform’, requires ~eureqa.search_settings.SearchSettings.row_weight to be unspecified. ‘custom’ allows arbitrary expressions.
  • target_expression (str) – The target expression.
target_expression

The target expression to optimize.

Only set if a custom expression is required. If set, the resulting search will be treated as an “Advanced” search in the UI; the variable chooser will be replaced with an expression editor.

search_templates

class eureqa.search_templates.SearchTemplates(eureqa)

Provides a set of search settings for well known search scenarios.

Parameters:eureqa (eureqa.Eureqa) – A eureqa connection.
classification(name, target_variable, input_variables)

The classification search settings template.

Parameters:
  • name (str) – The search name.
  • target_variable (str) – The target variable.
  • input_variables (list) – The list (str) of input variables.
Return type:

SearchSettings

numeric(name, target_variable, input_variables)

The numeric search settings template.

Parameters:
  • name (str) – The search name.
  • target_variable (str) – The target variable.
  • input_variables (list) – The list (str) of input variables.
Return type:

SearchSettings

time_series(name, target_variable, input_variables, min_delay=1, data_custom_history_fraction=0.1, max_delays_per_variable=None)

The time series search settings template.

Parameters:
  • name (str) – The search name.
  • target_variable (str) – The target variable.
  • input_variables (list) – The list (str) of input variables.
  • min_delay (int) – Optionally specify the minimum number of rows used in the range functions.
  • data_custom_history_fraction (float) – Optionally specify the percentage of the data to be withheld from history blocks. Specifies the maximum possible delay for a history block.
  • max_delays_per_variable (int) – Optionally overrides data_custom_history_fraction to directly set the maximum possible delay for a history block.
Return type:

SearchSettings

time_series_classification(name, target_variable, input_variables, min_delay=1, data_custom_history_fraction=0.1, max_delays_per_variable=None)

The time series classification search settings template.

Parameters:
  • name (str) – The search name.
  • target_variable (str) – The target variable.
  • input_variables (list) – The list (str) of input variables.
  • min_delay (int) – Optionally specify the minimum number of rows used in the range functions.
  • data_custom_history_fraction (float) – Optionally specify the percentage of the data to be withheld from history blocks. Specifies the maximum possible delay for a history block.
  • max_delays_per_variable (int) – Optionally overrides data_custom_history_fraction to directly set the maximum possible delay for a history block.
Return type:

SearchSettings

solution

class eureqa.solution.Solution(body, search)

Represents one of the solution found by the system for a particular search.

Parameters:
  • search (eureqa.Search) – The search object for this solution
  • body (dict) – Class metadata as dictionary
Variables:
  • target (str) – The target variable.
  • model (str) – The model expression.
  • complexity (int) – The model complexity based on the complexity weights.
  • is_best (bool) – An indicator whether the solution is considered to be the best based on its complexity and precision. The system can pick only one solution as best.
  • is_most_accurate (bool) – An indicator whether the solution is the most accurate for the optimized error metric. The system can pick only one solution as most accurate.
  • optimized_error_metric (str) – The error metric for which the solution was optimized. It is one of the error metrics from error_metric.
  • optimized_error_metric_value (float) – The value of the optimized error metric.
  • search (Search) – The search object to which this solution belongs.
get_all_series_error_metrics(data_split='all')

Returns the metric values for each series in the datasource.

Parameters:data_split (str) – For internal use only.
Returns:list of :class: ~eureqa.ErrorMetrics objects.
Return type:list
get_error_metric_value(name)

Returns the value for the specified error metric.

Parameters:name (str) – One of the error metrics from error_metric.
Return type:float
get_single_series_error_metrics(series_index, data_split='all')

Returns the metric values for the specified series in the datasource.

Parameters:
  • series_index (int) – The series to compute the metrics on
  • data_split (str) – For internal use only.
Return type:

~eureqa.ErrorMetrics

variable_details

class eureqa.variable_details.VariableDetails(body, data_source)

Represents a variable_details object on the server.

Parameters:
  • data_source (DataSource) – The data source definition for the variables.
  • body (dict) – Class metadata as dictionary
Variables:
  • name (str) – The name of the variable.
  • display_name (str) – The name to display in the ui`.
  • expression (str) – The expression used to create the variable if it is a custom variable
  • min_value (int) – The smallest value.
  • max_value (int) – The largest value.
  • mean_values (int) – The mean value.
  • standard_deviation (int) – The standard deviation of the values.
  • distinct_values (int) – The number of distinct values.
  • missing_values (int) – The number of missing values.
  • error_metric (str) – One of the error metrics from eureqa.error_metric.
  • datatype (str) – Whether it is a binary or numeric variable
  • num_zeros (int) – The number of zero values.
  • num_ones (int) – The number of one values.
  • categories (list) – The categories.
  • data_source (DataSource) – The DataSource the VariableDetails belongs to
update_categories(categories)

Update the display name of the variable

Parameters:categories (list) – The categories to set for the variable
update_display_name(display_name)

Update the display name of the variable

Parameters:display_name (str) – The name to show for the variable in the ui

variable_options

class eureqa.variable_options.VariableOptions(name=None, smoothing_enabled=False, smoothing_along=None, smoothing_percent=None, smoothing_weight=None, missing_value_policy='column_iqm', remove_outliers_enabled=False, outlier_threshold=None, normalize_enabled=False, normalization_offset=None, normalization_scale=None)

Represents a set of settings for a variable that can be included into a search.

Parameters:
  • name (str) – The name of the variable. It is the same as a column name in the list of data source columns.
  • smoothing_enabled (bool) – Whether the smoothing capability is enabled or not
  • smoothing_along (int) – The x variable used to apply smoothing.
  • smoothing_percent (int) – The amount of smoothing to apply, where 0% indicates none and 100% indicates max smoothing.
  • smoothing_weight (int) – A variable or expression which indicates the weights to apply to each row during smoothing.
  • missing_value_policy (str) – A policy name for the processing of missing values. One of the values from missing_value_policies module can be used.
  • remove_outliers_enabled (bool) – Enables removal of rows which contain outlier.
  • outlier_threshold (float) – The threshold at which a point is considered an outlier and will be removed.
  • normalize_enabled (bool) – Enables normalization of the variable.
  • normalization_offset (int) – A constant offset to subtract from each value.
  • normalization_scale (int) – A constant factor to divide each value by before adding the offset.
Variables:
  • name (str) – The name of the variable. It is the same as a column name in the list of data source columns.
  • missing_values_enabled (bool) – Enables additional processing of missing values.
  • missing_value_policy (str) – A policy name for the processing of missing values. One of the values from missing_value_policies module can be used. missing_value_policies.column_mean is used if the additional processing of missing values is enabled but no policy name provided.
  • remove_outliers_enabled (bool) – Enables normalization of the variable.
  • outlier_threshold (float) – The threshold at which a point is considered an outlier and will be removed.

variable_options_dict

class eureqa.variable_options_dict.VariableOptionsDict(...)

Create a dictionary of eureqa.variable_options.VariableOptions objects in which the key is the eureqa.variable_options.VariableOptions name

This class is used primarily to hold variable parameter overrides for eureqa.eureqa.Eureqa and eureqa.search.Search methods.

add(variable_options)

Add an existing eureqa.variable_options.VariableOptions to this dictionary.

Parameters:variable_options (VariableOptions) – eureqa.variable_options.VariableOptions object to add