-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use Mamba for forecasting #14
Comments
You can read Mamba's paper to learn the principles of Mamba Block. In fact, the input and output of Mamba Block are the same as those of classic RNN models such as LSTM and GRU. The input is the original tensor of the BLD shape, and the output is the hidden tensor (BLD Shape) corresponding to each position. |
But my code is related to bus arrival time which has both categorical and
numerical features. Can you guide me how to do encoding for these. If
needed I can share sample data for reference.
…On Fri, 10 May, 2024, 4:48 pm wzhwzhwzh0921, ***@***.***> wrote:
You can read Mamba's paper to learn the principles of Mamba Block. In
fact, the input and output of Mamba Block are the same as those of classic
RNN models such as LSTM and GRU. The input is the original tensor of the
BLD shape, and the output is the hidden tensor (BLD Shape) corresponding to
each position.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25XMMSR2APAKKCTWIF3ZBSUHHAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGQZTANRVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
An little example for forecasting in a notebook would be great @wzhwzhwzh0921 |
I just want how to do encoding and train the model. As it is numerical data
in a csv format. Can you guide me with that.
…On Sun, 2 Jun, 2024, 9:01 pm Tom Koester, ***@***.***> wrote:
An little example for forecasting in a notebook would be great
@wzhwzhwzh0921 <https://github.com/wzhwzhwzh0921>
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25WIS7NEBVXLJACUXNTZFM3ELAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTHEYDAOJTGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The data preproccesing for excatly this model i cant help. I just build an Prototype of the iTransformer model last week for TSA. |
Here is my data description
Name Description Data Type Example
service_date Date on which the trip took place. Service dates run from
around 2:00AM - 1:59:59AM Date 2019-12-31
route_id Route Id String 01
direction_id Identifies whether the trip is traveling inbound or outbound
String Inbound
half_trip_id Identification for the one way trip Integer 40836717
stop_id GTFS-compatible stop Integer 75
time_point_id The code for the timepoint String mit
time_point_order The order of this timepoint in the trip Integer 4
point_type Identifies whether the stop is the starting point, midpoint, or
endpoint for the trip String Midpoint
standard_type Identifies whether the trip should be evaluated on the
scheudle standard or headway standard. String Headway
scheduled The time the trip was scheduled to depart the stop. The
scheduled time should not be used to evaluated reliability if this trip is
evaluated on the headway standard. Only the headway and run time should be
used per the Service Delivery Policy. Time 12:30 AM
actual The time the trip actually departed the timepoint. Time 12:29 AM
scheduled_headway The scheduled time between the trip and the previous
trip at the stop, in seconds. NULL if this trip is evaluated on the
schedule standard. Integer 1200
headway The actual time between the trip and the previous trip at the
stop, in seconds. NULL if this trip is evaluated on the schedule standard
or if this is the last stop on the trip (endpoint). Endpoints are evaluated
by whether the trip runtime is within 120% of the scheduled run time.
Integer 1163
…On Sun, 2 Jun, 2024, 10:04 pm Tom Koester, ***@***.***> wrote:
The data preproccesing for excatly this model i cant help. I just build an
Prototype of the iTransformer model last week for TSA.
For encode categorial data just encode it with numbers. If i get you
problem right that would be something like bus:1 train:2 .... and after
encoding you can normalize the data with sin/cos.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25QZKVAEI2TDTVNIL5DZFNCRJAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTHEZDMMJUGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You can try Mambular (Mamba for Tabular data) new Python package ready to use: |
Is it using Mamba concept under the hood
…On Sun, 23 Jun, 2024, 2:52 am Eric Leonardo Cunha, ***@***.***> wrote:
You can try *Mambular* (Mamba for Tabular data) new Python package ready
to use:
https://github.com/basf/mamba-tabular
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25RD45CXUYZBRBMGSNDZIXTIHAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUGE4TGNBZGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yes, it is Mamba based. Take a look at the description and docs:
|
In the github it is showing an example of Classification. But my use case
is for Regression.
If possible can you make a simple example code snippet for Regression and
Classification algorithm using Mamba
…On Sun, 23 Jun, 2024, 8:43 am Eric Leonardo Cunha, ***@***.***> wrote:
Yes, it is Mamba based. Take a look at the description and docs:
https://mambular.readthedocs.io/
Mambular is a Python package that brings the power of Mamba architectures
to tabular data, offering a suite of deep learning models for regression,
classification, and distributional regression tasks. Designed with ease of
use in mind, Mambular models adhere to scikit-learn's BaseEstimator
interface, making them highly compatible with the familiar scikit-learn
ecosystem. This means you can fit, predict, and evaluate using Mambular
models just as you would with any traditional scikit-learn model, but with
the added performance and flexibility of deep learning.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25SIFGO3BGVC4BOED2TZIY4M3AVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUGQYTANZUGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Just read the docs. Regression: https://mambular.readthedocs.io/en/latest/examples/regression.html |
Yeah I got that, My problem is more leaned to Time Series Forecasting. Can
you give some suggestions on how to use it for time series.
…On Sun, 23 Jun, 2024, 7:19 pm Eric Leonardo Cunha, ***@***.***> wrote:
Just read the docs. Regression:
https://mambular.readthedocs.io/en/latest/examples/regression.html
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25WB7RFUBEOGF22BGWLZI3G6BAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUHE4TONBXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You can use the regression. In the train_test_split use shuffle=False to avoid leaking future samples in the training.
|
Is it also appliable for probalistic output to do multilabel classification? @ericleonardo |
You can try the Classification with multiclass output. In the example, it is used 4 classes:
|
@ericleonardo Hey, thanks for the fast reply. |
Here is the link for the data description
https://mbta-massdot.opendata.arcgis.com/datasets/ef464a75666349f481353f16514c06d0/about
…On Sun, 23 Jun, 2024, 8:22 pm Eric Leonardo Cunha, ***@***.***> wrote:
You can use the regression. In the train_test_split use shuffle=False to
avoid leaking future samples in the training.
Please, show how your data is structured. The description you sent above
is confused because mixed columns.
You can use print screen and paste here.
Name Description Data Type Example
service_date Date on which the trip took place. Service dates run from
around 2:00AM - 1:59:59AM Date 2019-12-31
route_id Route Id String 01
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH3Y25QS2UMHD23XFY3C3ULZI3OJJAVCNFSM6AAAAABGJPGUW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVGAZDANZQGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I don't know if it will output class probabilities. You can ask the author: |
Hello can you provide a Python Notebook for "How to do forecasting using Mamba?"
How to use Mamba to forecast and compare with LSTM, RNN also.
The text was updated successfully, but these errors were encountered: