Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program that loads the input file and produces to the following discretization. 1. Equal-Interval binning with 50 bins. Use the EqualIntervalBin.py (Code

image text in transcribedWrite a Python program that loads the input file and produces to the following discretization.

1. Equal-Interval binning with 50 bins. Use the EqualIntervalBin.py (Code is in the image above, but don't know why print f keep giving me syntax error) program as a starting point, modify the program to use 50 bins for the numeric.data file (file data is below)

320 874 625 524 56 452 972 517 566 271 116 130 903 859 421 427 89 531 871 836 797 677 448 707 345 857 793 392 195 86 230 720 81 665 708 434 122 55 950 633 149 47 570 346 445 634 483 431 977 78 666 816 731 619 637 732 52 991 813 760 562 493 199 588 354 504 316 461 674 69 868 594 267 116 801 4 598 713 878 558 130 703 813 712 277 884 313 691 83 841 477 906 838 569 972 354 113 586 61 633 119 387 691 572 846 743 920 282 801 90 390 717 526 44 557 789 133 11 128 774 796 916 113 653 882 681 632 813 46 686 710 996 597 288 396 173 161 206 698 506 760 777 232 787 111 306 626 707 314 485 122 537 688 824 247 331 379 403 253 5 93 774 321 205 641 352 715 920 829 902 75 326 424 333 647 985 839 712 176 698 650 296 978 464 45 268 724 990 680 131 783 408 961 244 711 887 144 535 667 822 204 266 183 521 751 688 916 201 967 109 724 164 405 290 805 763 6 662 260 166 75 312 914 408 552 714 579 179 60 395 475 56 327 152 708 841 352 252 278 686 203 65 192 840 834 35 278 251 129 355 589 449 7 570 398 950 178 194

f = open('numeric.sm.data', 'r'), print f bin = { (1, 100): 0, (101,200): 0, (201,300): 0, (301,400): 0, (401,500): 0, (501, 600): 0, (601,700): 0, (701,800): 0, (801,900): 0, (901,1000): 0 for input in f: for k, v in bin.iteritems(): if (k[@]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

Understand what a service-oriented culture is.

Answered: 1 week ago

Question

Explain the key areas in which service employees need training.

Answered: 1 week ago