The archive contains 500 csv refines. Each axioms refine includes a set of car security policies delay their appertaining attributes. Here, a portfolio represents a work of security policies. The appearance is to forecast the unless logarithm of damage affinity of a portfolio.
This assignment has two parts: (1) Axioms Generation, and (2) Modeling.
(1) [40pts] Axioms Generation - produce a musicbook (generate_dataset.ipynb) that generates a new consideration delay 500 rows and each row contains a set of epitome attributes that are extracted from the appertaining portfolio refine.
· Produce a character called read_portfolio that takes a sum as an reasoning (portfolio sum in this subject)
· Load the axioms selfsame to the portfolio sum into a Pandas axioms bring-about
· [20pts] Calculate the forthcoming epitome attributes of a portfolio:
· ID - portfolio sum
· VATD_NA - not-absolute abundance of 'Vehicle_Anti_Theft_Device' = 'Not Applicable' (music this is fitting the sum of policies that fill this term disconnected by the aggregate sum of policies in the portfolio)
· VATD_Passive - not-absolute abundance of 'Vehicle_Anti_Theft_Device' = 'Passive Disabling-Vehicle Recovery'
· VATD_Alarm - not-absolute abundance of 'Vehicle_Anti_Theft_Device' = 'Alarm Only'
· VATD_Active - not-absolute abundance of 'Vehicle_Anti_Theft_Device' = 'Active Disabling'
· DMA_mean - medium of 'Driver_Minimum_Age'
· DMA_std - rule dissolution of 'Driver_Minimum_Age'
· VAY_mean - medium of 'Vehicle_Age_In_Years'
· VAY_std - rule dissolution of 'Vehicle_Age_In_Years'
· AP_mean - medium of 'Annual_Premium'
· AP_std - rule dissolution of 'Annual_Premium'
· ln_LR - unless logarithm of damage affinity, which is obtained using the forthcoming formula (ln_LR=log[ sum('Loss_Amount') / sum('Annual_Premium') ]
· The character should give-back a dictionaries delay this values. This is how it should appear relish for portfolio #1:
· Produce an void axioms bring-encircling to convene the epitome attributes of all the portfolios.
· Write a for loop that goes from 1 to 500 and calls the read_portfolio function. Append the results of the character to the new axioms bring-about. (You jurisdiction entertain to overcontemplate the apostacy close)
· After the axioms bring-encircling has been employed and contains 500 rows, set the apostacy to 'ID'. Close is a snapshot of how your top 5 rows of your new axioms bring-encircling should appear relish.
· [20pts] Export this axioms into a refine called summary_portfolios.csv
(2) [60pts] Modeling - produce a musicwork (modeling.ipynb) that gain be used to set-up two moulds to forecast ln_LR, a rectirectirectilinear retirement delayout regularization, and a Lasso retirement delay the regularization parameter attached by ill-conditioned-validation.
· Load the axioms contained in summary_portfolios.csv into a pandas axioms bring-about. Produce stable you set the apostacy to 'ID'.
· [5pts] Produce numpy arrays delay the features and the target. Print the media and stds of the input features.
· [5pts] Scale the input features such that the all entertain cipher medium and individual rule dissolution. [Checkout Axioms Scaling in the Axioms Wrangling module]
· [5pts] Split the axioms into grafting and testing. Do not quibble it! Use the highest 300 rows for grafting and the definite 200 for testing.
· [5pts] Using the grafting axiomsset set-up a LinearRegression. What is the neutralize and the coefficients associated delay the input attributes?
· [5pts] Using the grafting axiomsset set-up 100 L1-regularized rectirectirectilinear moulds selfsame to 100 regularization coefficients evenly spaced between 0.001 and 0.1. Use the 10-fold ill-conditioned validation to furnish the best regularization coefficient. What is the neutralize and the coefficients associated delay the input attributes selfsame to the best regularization coefficient?
· [5pts] Calculate the forthcomings:
· Rectirectilinear Retirement - grafting RMSE
· Rectirectilinear Retirement - testing RMSE
· Lasso (best alpha) - grafting RMSE
· Lasso (best alpha) - medium RMSE obtained by averaging the 10 RMSEs obtained during ill-conditioned-validation
· Provide the 95% belief moderationtime in the aloft medium (you gain insufficiency to estimate the Rule Error)
· Lasso (best alpha) - testing RMSE
· [10pts] Which mould do you further between the Rectirectilinear Retirement and Lasso (best alpha) and why?
· [10pts] What joined notification Lasso gives encircling forecasting the target?
· [10pts] What attention can you produce by comparing the 95% belief moderationtime for the medium RMSE and the testing RMSE for Lasso?
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more