Question 1: Data Wrangling: Advanced Transformation Technique
Various transformation methods are applied to the data to have better-performing data for our machine learning model.
The transformation methods aim to remove the outliers, adjust skewed distributions, or gain a more Gaussian-like distribution through monotonic transformation, or both.
Your task is to apply the Box-Cox transformation and to obtain the distribution that is most Gaussian-like.
You are given a dataset consisting of a single column for which you have to apply the transformation.
Dataset
You are given a single feature dataset, consisting of floating-point values.
Note
Normality is an important assumption for many statistical techniques. Box-Cox transformation is a way to transform non-normal dependent variables into a normal shape. Below is the mathematical representation for the Box-Cox transformation. 10-1 VA) = A ' log if, if A O 0; if A = 0.
Round off the output numbers to 3 digits after the decimal. Example: 2.660, 5.882, 3.000
Function Description
In the provided code snippet, print the output using variables. You can write your code in the space below the phrase "WRITE YOUR LOGIC HERE".
There will be multiple test cases running so the Input and Output should match exactly as provided. The base Output variable result is set to a default value of -404 which can be modified. Additionally, you can add or remove these output variables.
Input Format
The only line of the test case consists of 4 space-separated floating-point values for which you have to find the Box-Cox transformation.
Question: 2 Data Modeling: Supervised Learning
in an electronics company, each product has a production cost and sale price. Your task is to use a decision tree classifier to predict the sales price of a new product, given its production cost.
Dataset
The first column in the dataset is the name of the product, the second is its production cost, and the third is its sales price. name of the product !production cost 'sales price
Note Train your model on default hyperparameter.
Input Format
The first line contains the name of the product. The second line contains an integer representing the production cost of that product.
Sample Input
Keyboard 1100 Output Format The output contains the predicted sales price of the product.
Sample Output
5000
Explanation
The predicted sales price using a decision tree algorithm is 5000.
Sample Input
5.1 4.9 4.7 4.6
Output Format
For each test case, output only one line, which contains space-separated values of the points after transformation.
Sample Output
-0.895 -1.185 -1.490 -1.647