Comments

You must log in or register to comment.

fujiitora t1_j1t6rjh wrote

That sounds like a dumb assignment, what is the exact problem and what does the data look like? Are you given a bunch of noisy points from some unknown sine curve and have to learn the defining parameters i.e. period/amp/shifts? Do you have to predict new points following that same curve at some new x value(s)? You can't predict outside of the training range, it will predict as an extension of the activation function. Whatever problem this actually is, its literally just a simple curve fitting one, using a NN is pointless

4

norpadon t1_j1t7342 wrote

Periodicity cannot be learned by a general neural network unless you impose some sort of structural prior onto it (e.g. use periodic activation functions), or transform your inputs accordingly (e.g. nn_input = x % (2*pi))

2

Red-Portal t1_j1t797h wrote

Vanilla ANNs, or MLPs more specifically, are well known to be shit at extrapolating, which is what you're trying to do. There has been some works using periodic activation functions that claim to be better. Try to look for those.

3

T4KKKK OP t1_j1t7xk0 wrote

Sorry for being inaccurate.

The exact problem is to predict the next couple points of the sine wave *outside* of the train range.

From the other responses I understood that its possible with periodic activation functions only.

1

Dendriform1491 t1_j1t8yhy wrote

I would rather recommend starting with polynomial curve fitting.

1

mk22c4 t1_j1tas9q wrote

y = sin(ax + b) is all you need. It’s 1 “neuron” with sine activation.

1

cruddybanana1102 t1_j1yj895 wrote

Neural networks with any non-linear activation should do the job, periodic activations are not necessary.

Also if you have to predict the sine wave, don't do neural networks. Try simpler learning algorithms, neural networks are mostly overkill. Imho kernel regression or something should be an easier way to go, but as always, can't guarantee without trying

1