Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

for my assignment, I am supposed to take one of my training files and then slice them, with the first file having 50 instances, and

for my assignment, I am supposed to take one of my training files and then slice them, with the first file having 50 instances, and the second 100. I feel like I am not doing it right because when I printed the files which I coded in python, I got different numbers which do not seem right to me! Where am I going wrong?

with open('test-1000-100.csv') as csv_file: #print (csv_file) for i, row in enumerate(csv_file): #print (row)] if (i>=50): break for i, row1 in enumerate (csv_file): if (i>100): break print (row) print (row1)

These are the numbers I got for the first 50 instances and then the 100 instances but the numbers look different to me. like in the first number in both sets, in the first set its 0.60583 but in the second, .64903. why is that?

0.60583,0.14042,0.67535,0.74284,0.23356,0.13371,0.73986,0.61025,0.95356,0.99106,0.022248,0.33429,0.14842,0.56296,0.26017,0.28097,0.99843,0.70971,0.54004,0.10779,0.030831,0.3071,0.55395,0.12075,0.19356,0.13596,0.52902,0.38009,0.70956,0.53206,0.15462,0.29409,0.52069,0.42737,0.70898,0.88028,0.62751,0.64682,0.67652,0.090099,0.99837,0.50894,0.66232,0.62401,0.099442,0.8349,0.26845,0.85876,0.19357,0.47542,0.62127,0.37763,0.24004,0.74452,0.17012,0.41364,0.52117,0.20889,0.49886,0.53807,0.83944,0.95618,0.34917,0.47026,0.015599,0.6137,0.51395,0.77798,0.69388,0.64421,0.80206,0.020116,0.95266,0.053256,0.42617,0.6762,0.55913,0.56185,0.91306,0.38034,0.16545,0.33569,0.69349,0.87031,0.79898,0.71253,0.42864,0.19402,0.22432,0.083798,0.36747,0.89613,0.2515,0.27608,0.99931,0.058563,0.5959,0.41302,0.40865,0.0077672,20.142

0.64903,0.11376,0.71262,0.82627,0.30759,0.05232,0.58869,0.35049,0.6718,0.48207,0.72877,0.50892,0.76453,0.70545,0.97282,0.11277,0.53105,0.73241,0.73979,0.062282,0.78604,0.24918,0.94657,0.22871,0.48467,0.30952,0.23632,0.17617,0.3434,0.61356,0.61984,0.59986,0.20123,0.72736,0.71761,0.86867,0.87956,0.13489,0.34749,0.0084586,0.91865,0.32724,0.15074,0.65302,0.84656,0.78475,0.62651,0.70059,0.59908,0.38415,0.97407,0.18062,0.059927,0.74441,0.90526,0.45658,0.24866,0.067868,0.74067,0.21102,0.32036,0.77087,0.70603,0.72575,0.68925,0.75215,0.03596,0.69843,0.53643,0.60914,0.87624,0.58493,0.31892,0.021684,0.87082,0.19324,0.36952,0.68154,0.89456,0.6785,0.73336,0.38508,0.41294,0.89513,0.10371,0.62586,0.39742,0.3365,0.94351,0.058431,0.27504,0.47776,0.40196,0.32807,0.62014,0.85778,0.60211,0.65524,0.61091,0.20628,20.238

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions