EV Car Purchase Prediction using Xgboost Prediction Model

JAYAMBE
4 min readJul 2, 2024

--

Electric vehicles (EVs) are becoming increasingly popular due to their eco-friendly nature and lower operating costs. However, predicting whether a customer will purchase an EV or not can be challenging as it depends on various factors such as demographics, personal preferences, and financial considerations.

In this project, we aim to develop a machine learning model that can accurately predict if a customer will buy an electric vehicle or not, based on a set of relevant features. By leveraging historical data and advanced algorithms, we can uncover patterns and relationships that influence a customer’s decision-making process.

The primary objective of this project is to build a reliable prediction model that can assist automotive companies, dealerships, and policymakers in understanding customer behavior and making informed decisions. This could include tailoring marketing strategies, optimizing inventory management, or designing targeted incentives to promote EV adoption.

Variable

Definition

1 BuyEV

purchase choice

2 PriceBudgetRatio

price of EV divided by respondent's highest budget

3 range

driving range of EV in scenario

4 HomeSlowChgWalkTime

walking time (minutes) from home to nearest slow charging

5 WorkSlowChagWalkTime

walking time (minutes) from work to nearest slow charging

6 FastChgTime

fast charging time (minutes) from empty to full charge

7 TownToFastChgDriveTime

driving time from any place in town to a fast-charging station (minutes)

8 HwyFastChgDistance

average distance (miles) between two fast charging stations on highway

9 gender

What is your gender?

10 race

Which race best describes you?

11 state

In what state or U.S. territory do you live?

12 license

Do you have a valid driver’s license?

13 edu

What is the highest level of education you have completed?

14 employment

Which of the following categories best describes your employment status?

15 hsincome

What was your household income last year?

16 hhsize

How many people currently live in your household?

17 housit

What is your housing situation?

18 residence

In what type of residence do you live?

19 move

Do you plan to move out from your current house within the next 3 years?

20 all_car

How many cars do you own?

21 new_car

If any, how many of your cars were new when they were purchased?

22 ev

How many electric cars do you own?

23 new_ev

If any, how many of your electric cars were new when they were purchased?

24 home_parking

What is your parking situation at home?

30 HomeChgAvai

Do you have an electrical outlet or electric vehicle (EV) charging facility at your usual home parking space?

31 work_parking

What is your usual parking situation at your place of work/school?

32 WorkChgAvai

Are electric vehicle (EV) charging facilities available at your place of work/school? i.e. Could you plug in an EV and charge it while parking at work/school?

33 buycar

Do you plan to buy a car in the next 3 years?

34 zipcode

your current home ZIP code

35 dmileage

Suppose you are replacing your car. How far do you typically drive the car to be replaced daily?

36 long_dist

How many long distance trips (i.e. trips more than 50 miles from your home) did you make by driving the car to be replaced last month?

37 gascost

Approximately how much money did you spend on gasoline for the car to be replaced last month?

38 age

In what year were you born? Age of respondent (years)=2019-answer

39 used_car_owner

whether respondent owns used car

40 used_ev_owner

whether respondent owns used EV

41 used

whether respondent answered used car scenario

42 NextCarBudget

Highest budget of next car chosen from the drop down menu in numerical form (eg. 10000)

43 PopDensity

Population density of home zipcode (based on 2010 Census)

44 orphan

whether the respondent is identified as a garage orphan who does not have an off-street home parking space or accessible electricity outlets for home charging

45 ev_owner

whether the respondent is an EV owner

46 priceshow

price of EV shown in each scenario

47 zip_median_home_value

Median home value of zipcode.

48 state_elec_price

Electricity price in each state (cent per kwh).

49 state_high_temp

State annual average high temperature over the entire state between 1991-2020.

50 state_precip

State annual average precipitation.

final calculate the score as output

convert output pdf :

link :

https://drive.google.com/file/d/1dmzq7b53MspDOkS9kJEWO7cYEnJ3TXgK/view?usp=sharing

--

--

No responses yet