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

The Archive Base Latest Questions

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

I want to write MapReduce (may be multiple rounds!) to 1. Sample N records

  • 0

I want to write MapReduce (may be multiple rounds!) to

1. Sample N records from Large data - for say X RandomTree
2. Train each tree (totally X)
3. And then test records on all these trees

Sequentially,

for X = 0 to 199:
    - sample N records from Large data
    - Train this tree
    - test for all test records

This is my homework problem, so I just need idea ..!

I’m not sure with

  1. In mapper can I sample exactly N records and generate 200 small
    training data file?
  2. To test each record on all 200 first option
    I thought of each reducer will run small test (part of test file)
    for ALL trees. second option I’m not sure, how to implement this
    is, run 200 tree independently and test file is in Distributed
    cache, predict for each test record.
  • 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-14T14:33:54+00:00Added an answer on June 14, 2026 at 2:33 pm

    It depends on how formal you work.

    A formal mapper cannot sample exactly N records. Because it cannot keep a counter, and it doesn’t know the total data size. A practical mapper in Hadoop certainly could. But he probably won’t know how many records he is going to receive in total.

    But as you said this is a homework, I don’t think you need to ensure it is exactly N.
    In particular, as you are sampling, what is the benefit of having exactly N records?

    Try the following:

    1. Determine the total size of records.
    2. Have each mapper emit each record with a likelihood of N/D to each tree (= key for reducer).
    3. Let the reducer train the tree on all the records it received.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want write a simple query which will fetch data from a table (which
I want to write a mapreduce code for counting number of records in given
I want write an win-form application to convert data from foxpro table into sql
I want write this sql select statment in mysql v 3.23 select * from
If I have, say, a million records on Mongo DB and each record is
I want to write a map/reduce job to select a number of random samples
I want write a little code analyzer which parses nested structures and translates into
Hello I want write my own desktop sharing application in Java. The application should
I want to write a batch script statement where: FINDSTR has to check for
I want to write a program in Prolog that confirms if a b-tree of

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.