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

  • SEARCH
  • Home
  • 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 9207477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:23:46+00:00 2026-06-18T00:23:46+00:00

I build this example using pybrain: from pybrain.tools.shortcuts import buildNetwork from pybrain.datasets import SupervisedDataSet

  • 0

I build this example using pybrain:

from pybrain.tools.shortcuts import buildNetwork
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import BackpropTrainer

net = buildNetwork(3, 3, 1)

dataSet = SupervisedDataSet(3, 1)
dataSet.addSample((0, 0, 0), (0))
dataSet.addSample((1, 1, 1), (0))
dataSet.addSample((1, 0, 0), (1))
dataSet.addSample((0, 1, 0), (1))
dataSet.addSample((0, 0, 1), (1))

trainer = BackpropTrainer(net, dataSet)

trainer.trainUntilConvergence()

result = net.activate([0, 0, 0])
print result

Output is: [ 0.10563189]

I don’t understand what is output of activate(). Network is trained, I test it for output with one of train samples, so I expect value exactly like in train samples. Input [0, 0, 0] should get output 0. What am I missing here? How do I get valid result?

Even more confusing is, that every time I run this code, I get different result. I’m obviously doing something wrong. What is it?

  • 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-18T00:23:48+00:00Added an answer on June 18, 2026 at 12:23 am

    Training a network until convergence does not imply that the training set is remembered perfectly. There are many reasons: size of hidden layer, activation function, learning rate, etc. All these parameters need to be tuned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the linkedin JS-API This example I'm accepting the company name from the
In this example.. http://jsfiddle.net/PKFyV/ You can see that I'm using jquery ui to build
I need a help how to build this example: http://blogs.oracle.com/arungupta/resource/totd154.zip from this tutorial http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services
I am using YUI 3 Uploader. I take this example from given reference url:
Imagine this as the code from build.xml: <project name=test project> <target name=first> <echo>first</echo> </target>
I am trying to build this very simple (visually speaking) layout using HTML/CSS that
I copied this example from perldoc -f sort . I added the @old array
I am using an JAX-RS example . This example contains two RESTful webservices, one
I've this example code. #include <iostream> #include <boost/filesystem.hpp> using namespace std; int main() {
I am trying to build a helloworld example for zeromq using the C# binding.

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.