Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/waikato-datamining/android-matrix-algorithms
Java library to be used on Android, simply applies precomputed matrices etc.
https://github.com/waikato-datamining/android-matrix-algorithms
android java matrix-algorithms pls savitzky-golay
Last synced: about 2 months ago
JSON representation
Java library to be used on Android, simply applies precomputed matrices etc.
- Host: GitHub
- URL: https://github.com/waikato-datamining/android-matrix-algorithms
- Owner: waikato-datamining
- License: apache-2.0
- Created: 2019-08-19T23:05:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-01T01:22:50.000Z (about 5 years ago)
- Last Synced: 2023-07-05T16:41:52.898Z (over 1 year ago)
- Topics: android, java, matrix-algorithms, pls, savitzky-golay
- Language: Java
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# android-matrix-algorithms
Java library to be used on Android, simply applies precomputed matrices etc.
as generated by [py-matrix-algorithms](https://github.com/waikato-datamining/py-matrix-algorithms).## Algorithms
* [Simple PLS (SIMPLS)](http://www.statsoft.com/textbook/partial-least-squares/#SIMPLS)
* [Savitzky-Golay](https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter)
* Standardize
* Log## Usage
Use the following code to load the preprocessing map from the serialized file
`map.bin` (with `one` and `two` named pipelines) and apply it to data (processing
the same data with both pre-processing pipelines):```java
import com.github.waikatodatamining.androidmatrix.PreprocessingMap;
import java.io.FileInputStream;
import java.utils.Map;
import java.utils.HashMap;
PreprocessingMap preprocessingMap;
preprocessingMap = new PreprocessingMap(new FileInputStream("map.bin"));double[] data = ...;
Map map = new HashMap<>();
map.put("one", data);
map.put("two", data);// for ordered application
double[][] processedOrdered = preprocessingMap.applyOrdered(data);
// for mapped application
Map processedMapped = preprocessingMap.apply(data);
```## Android
See the following StackOverflow post for how to wrap a `java.nio.ByteBuffer` in
a `java.io.InputStream`:https://stackoverflow.com/a/6603018/4698227