Skip to content

RFC: add the inverse logit function #27

@kgryte

Description

@kgryte

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

This RFC proposes adding support for computing the inverse logit function. The implementation is straightforward:

/**
* @param {number} x - input value
* @returns {number} function result
*/
function expit( x ) {
    return 1.0 / ( 1.0 + exp( -x ) );
}

Package: @stdlib/math/base/special/expit
Alias: base.expit

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Reference implementations:

  • SciPy [1][2]

See also @stdlib/math/base/special/logit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!Help WantedExtra attention is needed.MathIssue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions