Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what do I need to change in my excel file/Phyton in order for it to run #Load Saved Model import pickle filename = 'reg_model_save. sav'

image text in transcribed

what do I need to change in my excel file/Phyton in order for it to run

\#Load Saved Model import pickle filename = 'reg_model_save. sav' loaded_model = pickle.load(open(filename, ' rrb ')) \#rb - read binary same as open model/file \#Predict import statsmodels.api as sm input_new =sm. add_constant ( input_new ) predict output = loaded model.predict (input new) Huse the feature scalling variable to predict using save model predict_output = pd. DataFrame( { 'Predicted Price': predict_output } ) \#Create Data Frame ValueError Traceback (most recent call last) 2 import statsmodels.api as sm 3 input_new =5m. add_constant ( input_new ) 4 predict_output = loaded_model.predict(input_new) \#use the feature scalling variable to predict using save model 5 predict_output = pd.DataFrame( { 'Predicted Price':predict_output }) \#Create Data Frame 2 frames /usr/local/lib/python 3.8/ dist-packagesumpy/core/overrides.py in dot(*args, **kwargs) ValueError: shapes (5000,4) and (5,)notaligned:4 (dim 1) 1=5 (dim ) SEARCH STACK OVERFLOW

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 Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago

Question

2. Why has the conflict escalated?

Answered: 1 week ago