Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

Programming Basics and Data Analytics with Python|Amit|Sep13th-Oct1st|Amit|Sep13th-Oct1st

Assessment
App Rating Prediction

Variables seem to have incorrect type and inconsistent formatting. You need to fix them:
Size column has sizes in Kb as well as Mb. To analyze, you’ll need to convert these to numeric.
  1. Extract the numeric value from the column
  2. Multiply the value by 1,000, if size is mentioned in Mb
  3. def Convert_size(size):
    if 'M'in size:
    size= Convert_size[:-1]
    size= float(size)*1000
    return(size)
    elif 'K'in size:
    size = Convert_size[:-1]
    size = float(size)
    return(size) [Getting Error]



 
8. Data preprocessing

For the steps below, create a copy of the dataframe to make all the edits. Name it inp1.

can You plz tell what should i do now ?
 
  1. Reviews and Install have some values that are still relatively very high. Before building a linear regression model, you need to reduce the skew. Apply log transformation (np.log1p) to Reviews and Installs.

plz help me with this
 

_22207

Member
Hi, I have a doubt in Python program. Please help

CODE :
from imageai.Detection import ObjectDetection
import os

execution_path = os.getcwd()

detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.1.0.h5"))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image.jpg"), output_image_path=os.path.join(execution_path , "imagenew.jpg"))

for eachObject in detections:
print(eachObject["name"] , " : " , eachObject["percentage_probability"] )


ERROR:

Attribute Error : module'tensorflow.compat.v2.__internal__' has no attribute 'tf2'






no_photo.png
ReplyForward




 
Hi, I have a doubt in Python program. Please help

Train test split and apply 70-30 split. Name the new dataframes df_train and df_test.

Separate the dataframes into X_train, y_train, X_test, and y_test.
 

Attachments

  • er2.PNG
    er2.PNG
    58.4 KB · Views: 3
  • er1.PNG
    er1.PNG
    54.9 KB · Views: 3
  • er.PNG
    er.PNG
    50.6 KB · Views: 3

Rini Roy

Member
My R2 score values are very low.. R2 on train is 0.14 and on test 0.12.... have performed all the steps mentioned in the project.. After creating dummies i have 150 columns... Can you please suggest what can be done to improve R2 score ...
 
Top