Assignment 1 - Train Your First ML Model

Hello all i just want to know how can i connect my first assignment jupyter notebook file here

how can i connect my jupyter notebook here for submission

Hello, you need to commit your jupyter notebook file in Jovian.
Steps:

  • Install jovian library using !pip install jovian
  • import jovian within the notebook
  • Run jovian.commit(project="project_name", privacy="secret")

You will be prompted to enter an API key, you can get the API key after you login to your account in jovian.ai

1 Like

Thank you for response

1 Like

4. Transform and add new one-hot category columns

inputs_df[encoded_cols] = encoder.transform(inputs_df[categorical_cols])

error- # We (temporarily) allow for some missing keys with .loc, except in

KeyError: "None of [Index([‘MSZoning_C (all)’, ‘MSZoning_FV’, ‘MSZoning_RH’, ‘MSZoning_RL’,\n ‘MSZoning_RM’, ‘Street_Grvl’, ‘Street_Pave’, ‘Alley_Grvl’, ‘Alley_Pave’,\n …

I am getting error while trying to transform encoder with this.

I think first one is a good option. we should not manipulate data based on frequency of most occurring feature. Rathe we should create a new category. I think so. Make me correct if i am wrong.

Hey, can you restart the runtime and run all cells again?

How to remove nan values from the dictionary given in the end?

In the section ‘Making Predictions’, I have had to run the following function in a line-by-line manner to get it to work, adding in a few things. I hope that this is ok.

def predict_input(single_input):
    input_df = pd.DataFrame([single_input])
    input_df[numeric_cols] = imputer.transform(input_df[numeric_cols])
    input_df[numeric_cols] = scaler.transform(input_df[numeric_cols])
    input_df[encoded_cols] = encoder.transform(input_df[categorical_cols].values)
    X_input = input_df[numeric_cols + encoded_cols]
    return model.predict(X_input)[0]

Best to use the ‘fillna’ method, e.g.

Input_df[Categorical_cols] = Input_df[Categorical_cols].fillna(value="Unknown")

You can choose any other expression instead of ‘Unknown’.

Also, you may have to later convert the encoded array to a pd DataFrame before model.predict will accept it.

1 Like

Not sure if I put the weights correctly but I got this error.

1 Like

What is the expected RMSE value in this case for Train & Val both respectively ?
I think my value is really high even after changing Ridge Model parameters.

Hi Experts,

I am trying to assign different values to weights = ??? cell block for the assignment. Do i need to use any specific formula to assign values there?

Thanks,
Shiven

weights = model.coef_.flatten().tolist()
Try converting into a single list

2 Likes

use in inputs_df instead of prices_df because you have filled missing values in inputs_df and not in prices_df

1 Like

It’s been 5 days I have submitted my first assignment and still not verified…!!
Is there any problem with others or it’s only for mine?

Hello @birajde, Something seems to be wrong with charts/plots display. Like what @ngkennychna mentioned, I’m unable to get it to display as well. Tried px.imshow() as well as .show()

It does not appear to be a code issue.

The assignment evaluation will be done soon.

Hey @rajgt40, please check this post

I clicked Trust and re-ran the notebook. Still no display!