Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# enum2str

> Return the SGD classification learning rate scheduler string associated with an SGD classification learning rate scheduler enumeration constant.
> Return the SGD learning rate scheduler string associated with an SGD learning rate scheduler enumeration constant.

<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

Expand All @@ -37,15 +37,15 @@ limitations under the License.
## Usage

```javascript
var enum2str = require( '@stdlib/ml/base/sgd-classification/learning-rate-enum2str' );
var enum2str = require( '@stdlib/ml/base/sgd/learning-rate-enum2str' );
```

#### enum2str( value )

Returns the SGD classification learning rate scheduler string associated with an SGD classification learning rate scheduler enumeration constant.
Returns the SGD learning rate scheduler string associated with an SGD learning rate scheduler enumeration constant.

```javascript
var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );

var v = str2enum( 'basic' );
// returns <number>
Expand All @@ -54,7 +54,7 @@ var s = enum2str( v );
// returns 'basic'
```

If unable to resolve an SGD classification learning rate scheduler string, the function returns `null`.
If unable to resolve an SGD learning rate scheduler string, the function returns `null`.

```javascript
var v = enum2str( -999999999 );
Expand Down Expand Up @@ -82,8 +82,8 @@ var v = enum2str( -999999999 );
<!-- eslint no-undef: "error" -->

```javascript
var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
var enum2str = require( '@stdlib/ml/base/sgd-classification/learning-rate-enum2str' );
var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
var enum2str = require( '@stdlib/ml/base/sgd/learning-rate-enum2str' );

var str = enum2str( str2enum( 'basic' ) );
// returns 'basic'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var bench = require( '@stdlib/bench' );
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
var pkg = require( './../package.json' ).name;
var enum2str = require( './../lib' );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{{alias}}( value )
Returns the SGD classification learning rate scheduler string associated
with an SGD classification learning rate scheduler enumeration constant.
Returns the SGD learning rate scheduler string associated with an SGD
learning rate scheduler enumeration constant.

Parameters
----------
Expand All @@ -15,7 +15,8 @@

Examples
--------
> var out = {{alias}}( {{alias:@stdlib/ml/base/sgd-classification/learning-rate-str2enum}}( 'basic' ) )
> var v = {{alias:@stdlib/ml/base/sgd/learning-rate-str2enum}}( 'basic' );
> var out = {{alias}}( v )
'basic'

See Also
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
// TypeScript Version: 4.1

/**
* Returns the SGD classification learning rate scheduler string associated with an SGD classification learning rate scheduler enumeration constant.
* Returns the SGD learning rate scheduler string associated with an SGD learning rate scheduler enumeration constant.
*
* @param value - enumeration constant
* @returns learning rate scheduler string
*
* @example
* var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
* var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
*
* var v = str2enum( 'basic' );
* // returns <number>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

'use strict';

var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
var enum2str = require( './../lib' );

var str = enum2str( str2enum( 'constant' ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
'use strict';

/**
* Return the SGD classification learning rate scheduler string associated with an SGD classification learning rate scheduler enumeration constant.
* Return the SGD learning rate scheduler string associated with an SGD learning rate scheduler enumeration constant.
*
* @module @stdlib/ml/base/sgd-classification/learning-rate-enum2str
* @module @stdlib/ml/base/sgd/learning-rate-enum2str
*
* @example
* var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
* var enum2str = require( '@stdlib/ml/base/sgd-classification/learning-rate-enum2str' );
* var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
* var enum2str = require( '@stdlib/ml/base/sgd/learning-rate-enum2str' );
*
* var v = str2enum( 'basic' );
* // returns <number>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var objectInverse = require( '@stdlib/object/inverse' );
var enumeration = require( '@stdlib/ml/base/sgd-classification/learning-rates' ).enum;
var enumeration = require( '@stdlib/ml/base/sgd/learning-rates' ).enum;


// VARIABLES //
Expand All @@ -35,13 +35,13 @@ var hash = objectInverse( enumeration(), {
// MAIN //

/**
* Returns the SGD classification learning rate scheduler string associated with an SGD classification learning rate scheduler enumeration constant.
* Returns the SGD learning rate scheduler string associated with an SGD learning rate scheduler enumeration constant.
*
* @param {integer} value - learning rate scheduler enumeration constant
* @returns {(string|null)} learning rate scheduler string or null
*
* @example
* var str2enum = require( '@stdlib/ml/base/sgd-classification/learning-rate-str2enum' );
* var str2enum = require( '@stdlib/ml/base/sgd/learning-rate-str2enum' );
*
* var v = str2enum( 'basic' );
* // returns <number>
Expand Down
Loading