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

What i should change to improve results #235

Open
dfaustryjak opened this issue Jun 16, 2017 · 6 comments
Open

What i should change to improve results #235

dfaustryjak opened this issue Jun 16, 2017 · 6 comments

Comments

@dfaustryjak
Copy link

dfaustryjak commented Jun 16, 2017

Hello
I would like to predict stock price quotes
Results:
https://ibb.co/b2JDDQ
Here is my configuration:

    var myNet = new Architect.Perceptron(6, 4,4, 1);
    var errors = []
    var result=[]
    var counter=0;

    var trainingOptions = {
        rate: .1,
        iterations: 20000,
        error: .005,
        log: 1,
        schedule: {
            every: 1,
            do: function (data) {
                errors.push(data.error);
                console.log(data.error)
                counter =1;
                result.push({nr: counter, value: data.error});
            }
        }
    }

I don't know what i schould change...
Here is chart of error
https://ibb.co/fm01YQ

Input:
close price
mfi
cci
bop
volume
transactions

output
close price [t 1]

@wagenaartje
Copy link
Contributor

wagenaartje commented Jun 16, 2017

Just so you know: that is a fairly low error. And you don't have to user counter, as the data object contains a counter itself (data.iterations or data.iteration).

@cazala
Copy link
Owner

cazala commented Jun 16, 2017

You could try using a LSTM instead of a Perceptron, they work better for sequence prediction since they have memory cells where they store information from previous activations.

@cazala
Copy link
Owner

cazala commented Jun 16, 2017

like new Architect.LSTM(6, 5, 1), you could play a little bit changing the amount of memory blocks (the middle argument 5), but from my own experience, I would stick to only one layer of memory blocks (ie, not (6, 4, 4, 1) as your Perceptron setup) for the LSTM.

@dfaustryjak
Copy link
Author

Ehh i also try LSTM but result is similar ... it's also weird situation that sometimes i have only one iteration and error equal 0.003...

@dfaustryjak
Copy link
Author

I change output to:
close price [t 1]
close price [t 2]
close price [t 3]
and the results are simillar also ahh :P but the shape can told you when you schould buy 👍

@dfaustryjak
Copy link
Author

It's better now :) I get only last results...
https://ibb.co/caUqck

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

3 participants