stats-max
Compute the maximum value along one or more ndarray dimensions.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.7%) to scientific vocabulary
Keywords
Repository
Compute the maximum value along one or more ndarray dimensions.
Basic Info
- Host: GitHub
- Owner: lhui0005
- License: apache-2.0
- Language: JavaScript
- Default Branch: main
- Size: 60.5 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
📊 Stats-Max: Compute Maximum Values in ndarrays
Welcome to the Stats-Max repository! This project helps you compute the maximum value along one or more dimensions of ndarrays. If you're working with numerical data in JavaScript, this tool will streamline your calculations and enhance your data analysis capabilities.
Download Stats-Max
🚀 Table of Contents
📖 Introduction
In data analysis, finding the maximum value is a common task. Whether you're analyzing statistical data or working with multidimensional arrays, having a reliable way to compute maximum values is essential. Stats-Max offers a simple yet powerful solution for this purpose.
This library is designed for use in JavaScript environments, including Node.js. It works with ndarrays, making it ideal for those who deal with large datasets and require efficient computations.
✨ Features
- Easy to Use: Simple API for quick integration.
- Multidimensional Support: Compute maximum values across one or more dimensions.
- Fast Performance: Optimized for speed, even with large datasets.
- Lightweight: Minimal dependencies to keep your project lean.
- Flexible: Works seamlessly with existing JavaScript code.
📥 Installation
To get started with Stats-Max, you can install it via npm. Run the following command in your terminal:
bash
npm install stats-max
After installation, you can start using the library in your project. If you want to download the latest version, visit the Releases section.
🛠️ Usage
Using Stats-Max is straightforward. Here’s a quick example to demonstrate its functionality.
```javascript const { max } = require('stats-max');
// Create an ndarray const data = [1, 2, 3, 4, 5];
// Compute the maximum value
const maxValue = max(data);
console.log(The maximum value is: ${maxValue});
```
This code snippet computes the maximum value from a simple array. You can extend this to work with more complex ndarrays.
📚 API Reference
max(data, [axis])
- data: The input ndarray (array of numbers).
- axis: (Optional) The dimension along which to compute the maximum. If not provided, it computes the maximum over the entire array.
Returns: The maximum value found in the specified dimension.
Example
```javascript const { max } = require('stats-max');
const data2D = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ];
// Compute maximum across rows const maxInRows = max(data2D, 0); console.log(maxInRows); // Output: [7, 8, 9]
// Compute maximum across columns const maxInCols = max(data2D, 1); console.log(maxInCols); // Output: [3, 6, 9] ```
📊 Examples
Example 1: Basic Maximum Calculation
```javascript const { max } = require('stats-max');
const singleArray = [10, 20, 30, 40]; console.log(max(singleArray)); // Output: 40 ```
Example 2: Maximum in 2D Arrays
```javascript const { max } = require('stats-max');
const twoDArray = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ];
console.log(max(twoDArray, 0)); // Output: 7, 8, 9 console.log(max(twoDArray, 1)); // Output: 3, 6, 9 ```
Example 3: Handling Large Datasets
For large datasets, performance is key. Stats-Max is optimized to handle large ndarrays efficiently. Here’s how you can use it:
```javascript const { max } = require('stats-max');
const largeData = Array.from({ length: 1000000 }, (_, i) => i); console.log(max(largeData)); // Output: 999999 ```
🤝 Contributing
We welcome contributions to Stats-Max! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push to your branch.
- Open a pull request.
Please ensure your code follows our coding standards and includes appropriate tests.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
📬 Contact
For questions or feedback, feel free to reach out:
- Author: lhui0005
- Email: lhui0005@example.com
Thank you for checking out Stats-Max! We hope it helps you in your data analysis tasks. For more updates and releases, visit the Releases section.
Owner
- Login: lhui0005
- Kind: user
- Repositories: 1
- Profile: https://github.com/lhui0005
Citation (CITATION.cff)
cff-version: 1.2.0
title: stdlib
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name: The Stdlib Authors
url: https://github.com/stdlib-js/stdlib/graphs/contributors
repository-code: https://github.com/stdlib-js/stdlib
url: https://stdlib.io
abstract: |
Standard library for JavaScript and Node.js.
keywords:
- JavaScript
- Node.js
- TypeScript
- standard library
- scientific computing
- numerical computing
- statistical computing
license: Apache-2.0 AND BSL-1.0
date-released: 2016
GitHub Events
Total
- Release event: 1
- Push event: 772
- Create event: 2
Last Year
- Release event: 1
- Push event: 772
- Create event: 2
Dependencies
- @stdlib/array-zeros ^0.2.2 development
- @stdlib/assert-is-method ^0.2.2 development
- @stdlib/assert-is-ndarray-like ^0.2.2 development
- @stdlib/bench-harness ^0.2.2 development
- @stdlib/math-base-assert-is-nan ^0.2.2 development
- @stdlib/math-base-special-pow ^0.3.0 development
- @stdlib/ndarray-base-ctor ^0.2.2 development
- @stdlib/ndarray-ctor ^0.2.2 development
- @stdlib/ndarray-dtype ^0.2.2 development
- @stdlib/ndarray-empty ^0.3.0 development
- @stdlib/ndarray-empty-like ^0.3.0 development
- @stdlib/ndarray-order ^0.2.2 development
- @stdlib/ndarray-shape ^0.2.2 development
- @stdlib/ndarray-to-array ^0.2.1 development
- @stdlib/ndarray-zeros ^0.3.0 development
- @stdlib/random-array-discrete-uniform ^0.2.1 development
- @stdlib/random-array-uniform ^0.2.1 development
- istanbul ^0.4.1 development
- tap-min git+https://github.com/Planeshifter/tap-min.git development
- tape git+https://github.com/kgryte/tape.git#fix/globby development
- @stdlib/ndarray-base-unary-reduce-strided1d-dispatch-factory github:stdlib-js/ndarray-base-unary-reduce-strided1d-dispatch-factory#main
- @stdlib/ndarray-dtypes ^0.3.0
- @stdlib/stats-base-ndarray-dmax github:stdlib-js/stats-base-ndarray-dmax#main
- @stdlib/stats-base-ndarray-max github:stdlib-js/stats-base-ndarray-max#main
- @stdlib/stats-base-ndarray-smax github:stdlib-js/stats-base-ndarray-smax#main
- @stdlib/types ^0.4.3