npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rl-js/configuration

v0.9.5

Published

Configuration utilities for rl-js: Reinforcement Learning in JavaScript

Downloads

5

Readme

rl-js configuration

Configuration utilities for rl-js: Reinforcement Learning in JavaScript.

istallation

npm install --save @rl-js/configuration

JSDOC

Classes

Interfaces

Hyperparameter

Interface defining hyperparameter configuration

Kind: global interface

hyperparameter.getName() ⇒ string

Kind: instance method of Hyperparameter
Returns: string - the name of the hyperparameter

hyperparameter.defaultValue() ⇒ *

Kind: instance method of Hyperparameter
Returns: * - the default value for the hyperparameter

hyperparameter.randomValue() ⇒ *

Kind: instance method of Hyperparameter
Returns: * - a randomly chosen value for the hyperparameter

hyperparameter.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Hyperparameter
Returns: array - an array of hyperparameter values

| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |

ContinuousEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with a single continuous action and a continuous state space. The actions should be bounded by some range. The observation should be an array of numbers.

Kind: global interface
Extends: EnvironmentFactory

continuousEnvironmentFactory.getObservationCount() ⇒ number

Kind: instance method of ContinuousEnvironmentFactory
Returns: number - The size of the observation array for the environment

continuousEnvironmentFactory.getActionRange() ⇒ Array.<number>

Kind: instance method of ContinuousEnvironmentFactory
Returns: Array.<number> - An array whose first element represents the lower bound of the action, and the second element represents the upper bound.

DiscreteEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with discrete actions and a continuous state space. The actions should be an array of strings. The observation should be an array of numbers.

Kind: global interface
Extends: EnvironmentFactory

discreteEnvironmentFactory.getObservationCount() ⇒ number

Kind: instance method of DiscreteEnvironmentFactory
Returns: number - The size of the observation array for the environment

discreteEnvironmentFactory.getActions() ⇒ Array.<string>

Kind: instance method of DiscreteEnvironmentFactory
Returns: Array.<string> - The action set for the environment

TabularEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with discrete actions and a discrete state space. The actions should be an array of strings.

Kind: global interface
Extends: EnvironmentFactory

tabularEnvironmentFactory.getStates() ⇒ Array.<string>

Kind: instance method of TabularEnvironmentFactory
Returns: Array.<string> - The state set for the environment

tabularEnvironmentFactory.getActions() ⇒ Array.<string>

Kind: instance method of TabularEnvironmentFactory
Returns: Array.<string> - The action set for the environment

AgentBuilder

Kind: global class

new AgentBuilder()

Class defining a builder for AgentFactories. Used for defining the configuration of the resulting Agent

agentBuilder.getName() ⇒ string

Kind: instance method of AgentBuilder
Returns: string - Display name of the Agent

agentBuilder.getId() ⇒ string

Kind: instance method of AgentBuilder
Returns: string - The unique identifier for the Agent

agentBuilder.getHyperparameterDefinitions() ⇒ object

Kind: instance method of AgentBuilder
Returns: object - The hyperparameter definitions and ranges for the Agent

agentBuilder.buildFactory() ⇒

Kind: instance method of AgentBuilder
Returns: A fully configured AgentFactory

agentBuilder.buildAgent() ⇒

Kind: instance method of AgentBuilder
Returns: A fully configured Agent

agentBuilder.setEnvironmentFactory(environmentFactory)

The EnvironmentFactory corresponding to the specific Environment that the AgentFactory should be built for.

Kind: instance method of AgentBuilder

| Param | Type | | --- | --- | | environmentFactory | EnvironmentFactory |

agentBuilder.setHyperparameters(hyperparameters)

The specific set of hyperparameters for the agents constructed by the AgentFactory.

Kind: instance method of AgentBuilder

| Param | Type | | --- | --- | | hyperparameters | Hyperparameters |

agentBuilder.clone() ⇒

Clone this AgentBuilder

Kind: instance method of AgentBuilder
Returns: AgentBuilder

AgentSuite

Kind: global class

new AgentSuite()

Class representing a suite of similar or related agents.

agentSuite.getName() ⇒ string

Kind: instance method of AgentSuite
Returns: string - Display name of the agent suite

agentSuite.getId() ⇒ string

Kind: instance method of AgentSuite
Returns: string - Unique ID of the agent suite

agentSuite.listAgents() ⇒ Array.<AgentBuilder>

Kind: instance method of AgentSuite
Returns: Array.<AgentBuilder> - An array of AgentBuilders

agentSuite.getAgentBuilder(id) ⇒ AgentBuilder

Kind: instance method of AgentSuite

| Param | Type | Description | | --- | --- | --- | | id | string | The unique ID for the AgentBuilder |

agentSuite.getEnvironmentType() ⇒ *

Get the type of the environments that agents in this suite can handle. E.g. DiscreteEnvironmentFactory, TabularEnvironmentFactory, etc.

Kind: instance method of AgentSuite
Returns: * - An EnvironmentFactory type

EnvironmentBuilder

Kind: global class

environmentBuilder.getId() ⇒ string

Kind: instance method of EnvironmentBuilder
Returns: string - The unique ID of the EnvironmentBuilder

environmentBuilder.getName() ⇒ string

Kind: instance method of EnvironmentBuilder
Returns: string - Display name of the EnvironmentBuilder

environmentBuilder.buildFactory() ⇒ EnvironmentFactory

Kind: instance method of EnvironmentBuilder
Returns: EnvironmentFactory - Get an instance of EnvironmentFactory

environmentBuilder.getHyperparameterDefinitions() ⇒ object

Kind: instance method of EnvironmentBuilder
Returns: object - The hyperparameter definitions and ranges for the Environment

environmentBuilder.setHyperparameters(hyperparameters)

The specific set of hyperparameters for the agents constructed by the EnvironmentFactory.

Kind: instance method of EnvironmentBuilder

| Param | Type | | --- | --- | | hyperparameters | Hyperparameters |

environmentBuilder.buildEnvironment() ⇒ Environment

Kind: instance method of EnvironmentBuilder
Returns: Environment - Build an instance of the Environment

EnvironmentSuite

Kind: global class

new EnvironmentSuite()

Class representing a set of similar or related Environments

environmentSuite.getName() ⇒ string

Kind: instance method of EnvironmentSuite
Returns: string - The display name of the EnvironmentSuite

environmentSuite.getId() ⇒ string

Kind: instance method of EnvironmentSuite
Returns: string - The unique ID of the EnvironmentSuite

environmentSuite.getType() ⇒ *

Kind: instance method of EnvironmentSuite
Returns: * - A subclass of EnvironmentFactory corresponding to the EnvironmentType

environmentSuite.listEnvironments() ⇒ Array.<EnvironmentBuilder>

Kind: instance method of EnvironmentSuite
Returns: Array.<EnvironmentBuilder> - An array of the EnvironmentBuilders

environmentSuite.getEnvironmentBuilder(environmentName) ⇒

Kind: instance method of EnvironmentSuite
Returns: EnvironmentFactory

| Param | | --- | | environmentName |

Discrete ⇐ Hyperparameter

Class representing a hyperparameter with a discrete set of possible values

Kind: global class
Extends: Hyperparameter

discrete.getName() ⇒ string

Kind: instance method of Discrete
Overrides: getName
Returns: string - the name of the hyperparameter

discrete.defaultValue() ⇒ *

Kind: instance method of Discrete
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

discrete.randomValue() ⇒ *

Kind: instance method of Discrete
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

discrete.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Discrete
Overrides: discretize
Returns: array - an array of hyperparameter values

| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |

Exponential ⇐ Hyperparameter

Class representing a hyperparameter in logarithmic space

Kind: global class
Extends: Hyperparameter

exponential.getName() ⇒ string

Kind: instance method of Exponential
Overrides: getName
Returns: string - the name of the hyperparameter

exponential.defaultValue() ⇒ *

Kind: instance method of Exponential
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

exponential.randomValue() ⇒ *

Kind: instance method of Exponential
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

exponential.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Exponential
Overrides: discretize
Returns: array - an array of hyperparameter values

| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |

Fixed ⇐ Hyperparameter

Class representing a Fixed hyperparameter

Kind: global class
Extends: Hyperparameter

fixed.getName() ⇒ string

Kind: instance method of Fixed
Overrides: getName
Returns: string - the name of the hyperparameter

fixed.defaultValue() ⇒ *

Kind: instance method of Fixed
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

fixed.randomValue() ⇒ *

Kind: instance method of Fixed
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

fixed.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Fixed
Overrides: discretize
Returns: array - an array of hyperparameter values

| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |

Linear ⇐ Hyperparameter

Class reperesenting a hyperparameter in linear space

Kind: global class
Extends: Hyperparameter

linear.getName() ⇒ string

Kind: instance method of Linear
Overrides: getName
Returns: string - the name of the hyperparameter

linear.defaultValue() ⇒ *

Kind: instance method of Linear
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

linear.randomValue() ⇒ *

Kind: instance method of Linear
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

linear.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Linear
Overrides: discretize
Returns: array - an array of hyperparameter values

| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |