Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cawfree/timusoid
Cyclic representations of time.
https://github.com/cawfree/timusoid
cyclic moment network neural node percent time
Last synced: 2 months ago
JSON representation
Cyclic representations of time.
- Host: GitHub
- URL: https://github.com/cawfree/timusoid
- Owner: cawfree
- License: mit
- Created: 2020-01-03T22:59:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T04:52:19.000Z (about 2 years ago)
- Last Synced: 2024-08-09T08:57:08.152Z (5 months ago)
- Topics: cyclic, moment, network, neural, node, percent, time
- Language: JavaScript
- Size: 1.1 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# timusoid
Circular representations of time. These are useful for graphically representing the periodicity of time or representing time-dependent input behaviour in deep neural networks. This was inspired by [@ItsIanLondon](https://twitter.com/ItsIanLondon)'s article ["Encoding Cyclical Features in 24 Hour Time"](https://ianlondon.github.io/blog/encoding-cyclical-features-24hour-time/).## 🚀 Getting Started
Using [`npm`]():
```bash
npm install --save timusoid
```Using [`yarn`]():
```bash
yarn add timusoid
```## ✍️ Usage
```javascript
import moment from 'moment';
import { timusoid } from 'timusoid';const { sin, cos, tan, progress } = timusoid(
moment('2020-01-04T14:19:03.201Z'),
'yearly', // oneOf(['hourly', 'daily', 'weekly', 'monthly', 'yearly'])
);sin(); // 0.061703628813687975
cos(); // 0.9980945156603269
tan(); // 0.061821428577699
progress(); // 0.009826679853832305 (%)
```## ✌️ License
[MIT](https://opensource.org/licenses/MIT)