Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Flight Delay Big Data Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s2875462
Flight Delay Big Data Project
Commits
07fb92e0
Commit
07fb92e0
authored
3 years ago
by
s2300397
Browse files
Options
Downloads
Patches
Plain Diff
added the run time in distributed mode
parent
5043a506
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proportions_and_regression.py
+4
-1
4 additions, 1 deletion
proportions_and_regression.py
with
4 additions
and
1 deletion
proportions_and_regression.py
+
4
−
1
View file @
07fb92e0
#project code
#group 3
#Run time for distributed mode with 10 executer is 2m39s
from
pyspark
import
SparkContext
import
pyspark.sql.functions
as
F
from
pyspark.sql.functions
import
col
,
round
...
...
@@ -77,7 +80,7 @@ df_arrival=df.select('FlightNum', 'ArrDelay', 'DepDelay')
#arrival delay time analysis
from
pyspark.mllib.stat
import
Statistics
df_arrival
=
d
df_arrival
.
withColumn
(
'
ArrDelay
'
,
df_arrival
[
'
ArrDelay
'
].
cast
(
IntegerType
()))
df_arrival
=
df_arrival
.
withColumn
(
'
ArrDelay
'
,
df_arrival
[
'
ArrDelay
'
].
cast
(
IntegerType
()))
df_arrival
=
df_arrival
.
withColumn
(
'
DepDelay
'
,
df_arrival
[
'
DepDelay
'
].
cast
(
IntegerType
()))
correlation
=
df_arrival
.
stat
.
corr
(
"
ArrDelay
"
,
"
DepDelay
"
)
print
(
str
(
correlation
))
#the correlation is 0.86 which means that there is a positive strong correlation between departure delay and arrival delay
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment