Hi all,
I was working on a linear regression program, and when I try to convert the input file data to a float, I got this error.
Groove shark error: invalid literal for float (): iii. I'm using Windows XP SP2.
Here is a picture to better describe my problem…
Error:
Alert                                                         Â
Grooveshark error: invalid literal for float(): iii
Any idea what’s going on?
Answered By
Scot1984
15 points
N/A
#82204
Groove shark error: invalid literal for Float (): iii.
Linear regression wildly used in the information technology environment for simple linear equation y = mx + b, while in place m is the slope and b is the intercept.
This program will be utilized for the method this is completely a program which utilized in the Programming language, which is sensitive while compiling in the windows platform.
To avoid this error please be make sure that software program has obtain the latest patches and updates.
Check with the windows OS updates.
Apart from this check with the below stings to fix if that helps! Â Â Â
#! /usr/bin/env python
 import sys
 import os
 from numpy import *
 numLst = [] #an empty list
 if len(sys.argv) == 2:
     infile = open(sys.argv[1], 'r')
     for x in infile:
         numLst.append([float(i) for i in x.strip().split()])
 elif len(sys.argv) <2:
     infilename = raw_input("Name of file: ")
     data = open(infilename, 'r')
     for x in data:
         numLst.append([float(i) for i in x.strip().split()])
 elif len(sys.argv) > 2:
     raise SyntaxError, "Too many arguments"
 a = array(numLst)
 print a
 b = a[0:, 1] #this is just me manipulating the list a bit
 print b
 c = a[0:,1]
 print
 bA = b[:1]
 g = bA
 print numLst
Hope the above information will help you out.