Skip to content
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 handle scalar (context)? #92

Closed
jmrichardson opened this issue Jul 18, 2020 · 5 comments
Closed

How to handle scalar (context)? #92

jmrichardson opened this issue Jul 18, 2020 · 5 comments

Comments

@jmrichardson
Copy link

Thank you for mcfly, it is very helpful. I have a question regarding adding scalar inputs. I would like to to include contextual data in each subsequence without just making a feature of all the same value. Is this possible? For example, lets say I have a training set of shape:

20, 50, 5

For each of the 20 samples, I would like to include a scalar value indicating context for example (0 or 1).

Thanks for any advice

@cantino
Copy link
Owner

cantino commented Jul 18, 2020

I'm sorry, I don't understand this question. How are you using mcfly?

@jmrichardson
Copy link
Author

@cantino I am currently using mcfly the way that is documented in the examples and everything is working great. In my use case, I am feeding mcfly with financial price time series data for example MSFT open, high, low, close on a minute basis. However, I also have contextual data for example daily or weekly data. For example, I may have an interest rate value that I would like to feed into the model that would change on an irregular basis. The seglearn package refers to this as contextual data and has the ability to include in the model (here). Instead of having a feature called intrate that would be constant on a minute basis, is there a way to feed this scalar into the model using mcfly? After some research online, it appears that some folks engineer it into the layers:

Other popular methods of pulling this off usually inject scalar outputs after all the convolutional layers, when the last feature map has been flattened and the fully connected layers start, it is easy to concatenate in some auxiliary scalar inputs.

https://www.reddit.com/r/MLQuestions/comments/8euewm/how_to_combine_matrix_and_scalar_inputs_in_a_conv/

Thanks

@cantino
Copy link
Owner

cantino commented Jul 18, 2020

I'm pretty sure you're talking about a different mcfly project.

@jmrichardson
Copy link
Author

whooops... sorry, yes wrong mcfly:

https://github.com/NLeSC/mcfly

Thanks anyways :)

@cantino
Copy link
Owner

cantino commented Jul 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants