semvec/pypi-packages huggingface dataset:
topic-3 2.1.3
steel ewc test package
Requires Python: >=3.6

# Introduction
This project aims to provide a method to replicate our experiment results. 
We are expected to utilize Elastic Weight Consolidation (EWC) algorithm to 
improve the performance of multivariate time-series prediction.

# Model Choice
This project provides eight algorithm to choose, including 
MLP / CNN/ GDN / RNN/ GRU/ LSTM/ LSTMVAE / Transformer.


# Dataset Structure
- steel
  - TEst
    - Task1(拉速1.2)
       - 板柸1_9后半段数据
          - list.txt (names of multiple sensors)
          - test.csv (multivariate time series data)
    - Task2(拉速1)
       - 板柸2_4后半段数据
          - list.txt 
          - test.csv
    - Task3(拉速1.4)
       - 板柸3_3后半段数据
          - list.txt
          - test.csv
  - TRain
     - Task1(拉速1.2)
        - 板柸1_1数据
           - list.txt
           - train.csv
        - 板柸1_2数据
           - list.txt
           - train.csv
        - 板柸1_9数据
           - list.txt
           - train.csv
        - 板柸1_10数据
           - list.txt
           - train.csv
        - 板柸1_11数据
           - list.txt
           - train.csv
    - Task2(拉速1.2)
        - 板柸2_1数据
           - list.txt
           - train.csv
        - 板柸2_4前半段数据
           - list.txt
           - train.csv
    - Task3(拉速1.4)
        - 板柸3_1数据
           - list.txt
           - train.csv
        - 板柸3_3前半段数据
           - list.txt
           - train.csv
 
# Experimental Results
When you successfully complete the experiment, you should see the following figures in each task stage:

- Loss Curve for validation dataset
![image](topic_3/Forecast/forecast_continuous_learning/show_img/Figure_1.png)

- Loss Curve for training dataset
![image](topic_3/Forecast/forecast_continuous_learning/show_img/Figure_2.png)
  
- Comparison with prediction and observation 
![image](topic_3/Forecast/forecast_continuous_learning/show_img/Figure_3.png)
  
- Scatter plot with Regression Line
![image](topic_3/Forecast/forecast_continuous_learning/show_img/Figure_4.png)
  
- Residual Distribution
![image](topic_3/Forecast/forecast_continuous_learning/show_img/Figure_5.png)
  
# Requirements
- python==3.10.2
- torch==1.12.0
- torch-geometric==2.2.0
- torch-scatter==2.0.9
- torch-sparse==0.6.14
- numpy==1.22.3
- matplotlib==3.5.2
ayah-sender 0.1.6
Get Quranic audio and images easily.
Requires Python: >=3.8

<p align="center">
  <img alt="" style="{max-height: 50px}" src="./img/ayah-sender-v0.1.6.png">
</p>

# AyahSender

AyahSender is a Python package that allows you to have `Quranic audio `and `images` easily.

## Features

- Fetch a single ayah audio.
- Merge multiple ayahs into a single audio file.
- Supports various reciters.
- Saves audio files in MP3 format.
- Save transparent .png file of an ayah

## Installation

Install the package via pip:

```bash
pip install ayah-sender
```

## Requirements

- `requests`
- `pydub`
- `ffmpeg` - PyDub requires `ffmpeg` to perform its operations. 

Follow the articles to install ffmpeg on your system if you don't have it installed.

- [Windows](https://www.geeksforgeeks.org/how-to-install-ffmpeg-on-windows/)
- [Linux](https://www.geeksforgeeks.org/how-to-install-ffmpeg-in-linux/)
- [MacOS](https://phoenixnap.com/kb/ffmpeg-mac)

## Usage

### Basic Usage

Here is an example of how to use AyahSender:

```python
from ayah_sender import AyahSender

ayahSender = AyahSender()

# Show available reciters
reciters_dict = ayahSender.reciter.show_reciters()
print(reciters_dict)

# Fetch a single ayah's audio
audio_data = ayahSender.get_single_ayah(reciter_id=1, chapter_num=1, verse_num=1)

# Save the single ayah audio
ayahSender.save_audio(audio_data, output_dir='.')

# Merge multiple ayahs' audio
merged_audio_data = ayahSender.merge_ayahs(reciter_id=5, chapter_num=1, start_verse=1, end_verse=5)

# Save the merged audio file
ayahSender.save_audio(merged_audio_data, output_dir='.')

# Getting png image of an ayah
ayahSender.get_image(chapter_num=2, verse_num=255, output_dir='ayah-png')
```

### Functions

#### `get_total_verses_in_chapter(chapter_number)`

- Fetches the total number of verses in a given chapter.

#### `get_single_ayah(reciter_id, chapter_num, verse_num)`

- Fetches a single ayah from a specified reciter, chapter, and verse.

#### `merge_ayahs(reciter_id, chapter_num, start_verse, end_verse)`

- Fetches and merges a range of ayahs from a specified reciter and chapter.

#### `save_audio(audio_data, output_dir=".")`

- Saves the audio data to the specified directory.

#### `get_image(chapter_num, verse_num, output_dir='.')`

- Fetches and saves png image of an ayah

## Reciters List

The `reciters.csv` file contains the list of reciters. The `Reciter` class reads this file to fetch reciter information.

## Example

See [examples](examples) folder for examples.

## Contributing

Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT License](LICENSE)

## Contact

For any queries, contact us at [dev.asib@proton.me](mailto:dev.asib@proton.me).

## Acknowledgement

- [**everyayah.com**](https://everyayah.com/)   - Jazahumullahu Khairan to them for the `audio files`.
- [**Quran.com**](https://quran.com/)  - Jazahumullahu Khairan to them for the `API`.



---

Enjoy using `AyahSender` for your Quranic audio needs!