I want to use a neural net to give predictions, but I am not sure where to start. I do know that I don't want to use the high-level Predict function.

So what I have is a series of optical spectroscopies, which each corresponds to a single number from 0 to 1.

For example, in the plot attached, curves with different colors correspond to different numbers. Say, yellow curves correspond to 0.4 and red curves correspond to 0.8. I want to train the neural net so that when I input new curve data (meaning a list of numbers), it outputs a number between 0 to 1.

In short, what I want is: Input(a list of numbers) ---> Neural Net ---> Output(a single number between 0 to 1)

What kind of neural net should I use? Any examples? I didn't find any on the Neural Net Repository.

enter image description here

  • $\begingroup$ It seems you'd have to train your network yourself...that a specific list of data corresponds to a specific number between 0 and 1...though my guess is that you'll need a lot of already defined curves since your lines only really seem to have a small area that are different than each other. $\endgroup$ Sep 22, 2019 at 23:33
  • 1
    $\begingroup$ It would be easier to help if you could share your data. $\endgroup$
    – C. E.
    Sep 23, 2019 at 4:33

1 Answer 1


I wrote a blog post in the past that should help you get started with this. The documentation also has two pages that might be of interest to you:

https://reference.wolfram.com/language/tutorial/NeuralNetworksRegression.html#280210622 https://reference.wolfram.com/language/tutorial/NeuralNetworksRegressionWithUncertainty.html

  • $\begingroup$ Thank you for sharing this and for writing that blog post (which I've read before and appreciated at the time.) Consider posting this as a comment though, since link-only answers are discouraged. $\endgroup$
    – C. E.
    Sep 23, 2019 at 15:43
  • $\begingroup$ @Sjoerd Smit Your blog is very helpful, I already solved the problem following your solution. Thanks $\endgroup$
    – baker
    Sep 24, 2019 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.