Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:55:33+00:00 2026-06-14T16:55:33+00:00

I am new to machine learning and Encog overall, but I would have expected

  • 0

I am new to machine learning and Encog overall, but I would have expected Encog to at least give consistent results from the examples to help me learn about Encog more easily. For me Encoge will give different directional results each time it is run.

Can anyone help me better understand why this is? Below is some modified sample code that’s being used.

Direction correct:10/25

Direction correct:8/25

Direction correct:6/25

…

    public class MainPredict {
    public static void main(String[] args) {

        Co.println("--> Main Predict");

        final MarketLoader marketLoader = new YahooFinanceLoader();
        final MarketMLDataSet marketDataSet = new MarketMLDataSet(marketLoader, Config.INPUT_WINDOW, Config.PREDICT_WINDOW);
        final MarketDataDescription marketDataDescription = new MarketDataDescription(Config.TICKER, MarketDataType.adjusted_close, true, true);
        marketDataSet.addDescription(marketDataDescription);

        Calendar end = new GregorianCalendar();// end today
        Calendar begin = (Calendar) end.clone();// begin 30 days ago
        begin.add(Calendar.DATE, -60);
        end.add(Calendar.DATE, -60);
        begin.add(Calendar.YEAR, -2);

        marketDataSet.load(begin.getTime(), end.getTime());
        marketDataSet.generate();

        BasicNetwork basicNetwork = EncogUtility.simpleFeedForward(marketDataSet.getInputSize(), Config.HIDDEN1_COUNT, Config.HIDDEN2_COUNT, marketDataSet.getIdealSize(), true);

        ResilientPropagation resilientPropagation = new ResilientPropagation(basicNetwork, marketDataSet);
        resilientPropagation.setRPROPType(RPROPType.iRPROPp);

//      EncogUtility.trainToError(resilientPropagation, 0.00008);
        EncogUtility.trainConsole(basicNetwork, marketDataSet, 3);

        System.out.println("Final Error: " + basicNetwork.calculateError(marketDataSet));

        MarketEvaluate.evaluate(basicNetwork);

        Encog.getInstance().shutdown();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:55:34+00:00Added an answer on June 14, 2026 at 4:55 pm

    It’s pretty common for neural network weights to be initialized to random values, which pretty much trashes determinacy right up front. So to have repeatable results, you’d need to save a particular instance of your network whose random initial weights you liked, and then load that into other runs as a starting point.

    In this case, basicNetwork would be the one to save (perhaps with createPersistor() to serialize to XML), then reload each time you later wanted to reset it, rather than constructing a fresh one from scratch.

    Another test you could try is use basicNetwork.clone(), and then run your experiment on both of them and see how the results turn out.

    Links:

    • http://www.heatonresearch.com/javadoc/encog-2.3/org/encog/neural/networks/BasicNetwork.html#clone%28%29
    • http://www.heatonresearch.com/javadoc/encog-2.3/org/encog/persist/Persistor.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the certificates and keys on my new mac machine but when i
I have copied a project from my old XP machine to my new Win7
I am new in machine learning and computing probabilities. This is an example from
I am very new to C# but I am fast learning. I have seen
Ever since I installed emacs on a new machine I have seen an ugly
I'm implementing a new machine learning algorithm in Java that extracts a prototype datastructure
I'm fairly new at machine learning and text mining in general. It has come
Hey I am really new to the field of machine learning and recently started
I'm new to C# and have been working on learning database's. Currently I'm trying
I'm new to machine learning, I need to write an application which check whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.