- 29th Jun 2024
- 20:06 pm

In this assignment select only ONE “optimal” model designed to predict housing prices of real estate assets in a specific area given predefined asset and environmental characteristics (modified data is provided). Specifically, your FinTech team members are interested to see the effect of “age” variable in addition to other variables on the mean observed price per unit. You are free to choose one relevant model (we have covered few ML variations starting from a base simple OLS). Your task is to explain your steps and results and show model coefficients and model accuracy, for example in mean square error (MSE) and/or R^2.

Model choices

- Linear Regression
- RANSAC Regressor
- LASSO
- Polynomials
- Decision Tree
- Random Forest

Your team members are keen to learn about python and would like to see and read the python script with simple explanations of your steps. This is in light of relevant FinTech news that ZILLOW is exiting home buying business. As a result, delivery is in one python.py script format as with ‘’’’’’ explanations of your steps. The aim is to describe your detailed steps from input variables to model parameters and provide final results in a critical, concise and logical way.

**FinTech Use Case - Free Assignment Solution**

Please note that this sample assignment is solved by our Python programmers for research and reference. If you learn concepts from it, our Python tutors will be happy.

- Option 1 - Download the complete solution with code, report, and screenshots from our Free Assignment Sample Solution - FinTech Use Case page.
- Option 2 - Contact our Python tutors for online tutoring related to this assignment.
- Option 3 - View the partial solution for this assignment in the blog below.

**Free Assignment Solution - FinTech Use Case**

'''

Steps:

1. We will first load the provided dataset

2. We will remove the unwanted column such as "No"

3. We will then split the dataset as X (independent variable) and y (dependent variable, house_price_per_unit)

4. We will then fit the data into Linear Regression model (using statsmodels.regression.linear_model.OLS)

5. We will finally print the summary of the model and interpret the result

'''

# START CODE HERE

import pandas as pd

import statsmodels.api as sm

import warnings

warnings.filterwarnings('ignore')

df = pd.read_csv("housing.csv")

df.drop(columns=["No"], inplace=True)

X = df.drop(columns=["house_price_per_unit"])

y = df["house_price_per_unit"]

X = sm.add_constant(X)

model = sm.OLS(y,X)

results = model.fit()

print("Printing the bias (const) and the model coefficients\n")

print(results.params)

print("\nMSE value:", results.mse_total, "\n")

print(results.summary())

# END CODE HERE

'''

Results:

Model coefficients are:

const -14437.100802

trade_date 5.146227

age -0.269695

distance_to_MTR -0.004487

number_of_stores 1.133277

latitude 225.472976

longitude -12.423601

MSE value: 185.14

R^2 value: 0.582

On looking at the coefficients of the features, we find that

trade_date, number_of_stores, and latitude have positive coefficient value

which indicates that the house_price_per_unit increases with an increase

in any of the variables described.

On the contrary, the coefficients of the features age, distance_to_MTR and logitude

have negative coefficient value which indicates that the house_price_per_unit

decreases with an increase in any of the variables described for negative coefficient.

But going deeper into the results, we find that variable longitude have a

p-value (0.798) > significant level (0.05) which means that the coefficient

of longitude is not significant and we can discard this feature.

'''

Get the best FinTech assignment help and tutoring services from our experts now!

**About The Author - Taylor Reed**

He is an experienced Python developer with a specialization in financial technology (FinTech), will guide you through this assignment. Taylor's expertise lies in creating robust and efficient solutions for complex financial problems using Python. In this project, Taylor will help you understand and implement key FinTech concepts, ensuring you gain valuable insights and practical skills. With clear explanations and hands-on examples, Taylor's guidance will make learning Python for FinTech applications accessible and engaging.