Class

CrossValidation

CrossValidation(props) → {React.Component}

Overview

The cross-validation tab in RuLeStudio. Presents the outcome of cross-validation for information table from current project.
Constructor

# new CrossValidation(props) → {React.Component}

Parameters:
Name Type Description
props Object
objectGlobalName string

The global visible object name used by all tabs as reference.

onTabChange function

Callback fired when a tab is changed and there are unsaved changes in this tab.

project Object

Current project.

serverBase string

The host and port in the URL of an API call.

showAlert function

Callback fired when results in this tab are based on outdated information table.

value number

The index of a selected tab.

View Source Body/Project/Tabs/CrossValidation.js, line 53

React.Component

Methods

# static getCrossValidation()

Overview

Makes an API call on cross-validation to receive current copy of cross-validation from server. Then, updates state and makes necessary changes in display.

View Source Body/Project/Tabs/CrossValidation.js, line 164

# static getFold()

Overview

Makes an API call on selected fold from cross-validation to receive it's current copy from server. Then, updates state and makes necessary changes in display.

View Source Body/Project/Tabs/CrossValidation.js, line 109

# static onCalculateClick()

Overview

Makes an API call on cross-validation to cross-validate objects from current information table with selected parameters. Then, updates state and makes necessary changes in display.

View Source Body/Project/Tabs/CrossValidation.js, line 344

# static onFilterChange(event)

Overview

Filters items from CrossValidation's state. Method uses filterFunction to filter items.
Parameters:
Name Type Description
event Object

Represents an event that takes place in DOM.

View Source Body/Project/Tabs/CrossValidation.js, line 595

# static onSaveToFile(queryParams)

Overview

Makes an API call to download specified misclassification matrix.
Parameters:
Name Type Description
queryParams Object

Specifies the type of a matrix to downloaded.

View Source Body/Project/Tabs/CrossValidation.js, line 426

# componentDidMount()

Overview

A component's lifecycle method. Fired once when component was mounted.

Goal

Method calls getCrossValidation.

View Source Body/Project/Tabs/CrossValidation.js, line 229

# componentDidUpdate(prevProps, prevState, snapshot)

Overview

A component's lifecycle method. Fired after a component was updated.

Goal

If type of unions was changed to monotonic and consistency threshold is equal to 1, method changes value of threshold to 0.

If type of rules was changed to possible, method changes consistency threshold to 0.

If project was changed, method saves changes from previous project and calls getCrossValidation to receive the latest copy of cross-validation.
Parameters:
Name Type Description
prevProps Object

Old props that were already replaced.

prevState Object

Old state that was already replaced.

snapshot Object

Returned from another lifecycle method getSnapshotBeforeUpdate. Usually undefined.

View Source Body/Project/Tabs/CrossValidation.js, line 258

# componentWillUnmount()

Overview

A component's lifecycle method. Fired when component was requested to be unmounted.

Goal

Method saves changes from current project.

View Source Body/Project/Tabs/CrossValidation.js, line 316