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 8860295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:14:16+00:00 2026-06-14T15:14:16+00:00

I am predicting a value, I have 2 input layer and an output layer.

  • 0

I am predicting a value, I have 2 input layer and an output layer. Here is my code in which I have trained a PyBrain network and then tested it, I am missing how should I give a set of input to the network and how do I get the result. Please help me to proceed forward.

 ds = SupervisedDataSet(2,1)
 tf = open('data.csv','r')
 for line in tf.readlines():
 data = [float(x) for x in line.strip().split(',') if x != '']
 indata =  tuple(data[:2])
 outdata = tuple(data[2:])
 ds.addSample(indata,outdata)

 n = buildNetwork(ds.indim,8,8,ds.outdim,recurrent=True)
 t = BackpropTrainer(n,learningrate=0.01,momentum=0.5,verbose=True)
 t.trainOnDataset(ds,1000)
 t.testOnData(verbose=True)

what I should do next to give an input and predict on the input, How do I get the result for that set of input. Thanks!!

  • 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-14T15:14:17+00:00Added an answer on June 14, 2026 at 3:14 pm

    By calling the .activate() method of the network supplying your input. There’s also a more practicle activate on dataset.

    And a little tip, you may use the python’s native csv module

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

Sidebar

Related Questions

I have successfully trained a classifier (bayesnet) and constructed a test set (ARFF-format), which
I have a bit of code that fits theoretical prediction to experimental data, and
When I have a Dictionary<string, int> actual and then create a completely new Dictionary<string,
EDIT: The correct version of the code which works can be found at :
I have the following code that correctly generates the CKEditor: <script> $(function(){ $(#newWrite_body).ckeditor({ extraPlugins
I have a mobile app, which is pretty data driven, though only through text
While computer programming evangelists predicting the future of Cloud Computing to be very bright,
I guess no one will have a definative answer to this but considered predictions
We have audit columns set by triggers. For obscure security reasons predating my tenure
I have a dataset with more than 200 features and I would like to

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.