1596955440
Recently I started using Kaggle and did my first ever competition — Titanic: Machine Learning from Disaster. This is a beginner-friendly Machine Learning competition, where the goal is to predict whether given passengers will survive or not. In this post, I will share a basic data analysis of the Titanic data set. Before working on the dataset, Let’s start with Kaggle.
Kaggle, a subsidiary of Google LLC, is an online community of data scientists and machine learning practitioners. Kaggle allows users to find and publish data sets, explore and build models in a web-based data-science environment, work with other data scientists and machine learning engineers, and enter competitions to solve data science challenges.
_Kaggle got its start in 2010 by offering machine learning competitions and now also offers a public data platform, a cloud-based workbench for data science, and Artificial Intelligence education. — _Wikipedia
The sinking of the Titanic is one of the most infamous shipwrecks in history.
On April 15, 1912, during her maiden voyage, the widely considered “unsinkable” RMS Titanic sank after colliding with an iceberg. Unfortunately, there weren’t enough lifeboats for everyone onboard, resulting in the death of 1502 out of 2224 passengers and crew.
While there was some element of luck involved in surviving, it seems some groups of people were more likely to survive than others.
In this challenge, we ask you to build a predictive model that answers the question: “what sorts of people were more likely to survive?” using passenger data (ie name, age, gender, socio-economic class, etc). — Kaggle
This post is divided in 6 Steps.
To work with Kaggle, you need a Kaggle account. You can get your free Kaggle account by clicking here and sign up on Kaggle. Once you have an account, visit the titanic competition and enroll yourself in the competition.
The Titanic competition has three data files.
The ‘gender_submission.csv’ file is provided as an example that shows how you should structure your predictions. It predicts that all female passengers survived, and all-male passengers died. Your hypothesis regarding survival will probably be different, which will lead to a different submission file. However, your submission file has to look like this file.
‘train.csv’ contains the details of a subset of the passengers on board (891 passengers, to be exact — where each passenger details are given in different row in the table)
First, you have to find a hidden pattern in ‘train.csv’, and then based on that pattern, and you have to predict whether the given 418 passengers (in ‘test.csv’) will survive or not.
## data analysis and wrangling
import pandas as pd
import numpy as np
import random as rnd
## visualization
import seaborn as sns
import matplotlib.pyplot as pltsns.set_style('dark')
%matplotlib inline
Now our packages are imported successfully. Let’s load our data.
## load train data
train_data = pd.read_csv("/kaggle/input/titanic/train.csv")
## load test data
test_data = pd.read_csv("/kaggle/input/titanic/test.csv")
Let’s have a look at our train and test data.
train_data.head()
test_data.head()
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2\. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
view raw
train_head.csv hosted with ❤ by GitHub
First of all, let’s have a look at columns.
print(train_data.columns.values)
print("\n")
print('='*50)
print("\n")
print(test_data.columns.values)
## output
['PassengerId' 'Survived' 'Pclass' 'Name' 'Sex' 'Age' 'SibSp' 'Parch' 'Ticket' 'Fare' 'Cabin' 'Embarked']
==================================================
['PassengerId' 'Pclass' 'Name' 'Sex' 'Age' 'SibSp' 'Parch' 'Ticket' 'Fare' 'Cabin' 'Embarked']
We can see that train data have 12 columns, and test data have 11 columns. For test data, we have to predict whether passengers will survive or not.
#machine-learning #beginner #python #learning #kaggle #deep learning
1595494844
Are you leading an organization that has a large campus, e.g., a large university? You are probably thinking of introducing an electric scooter/bicycle fleet on the campus, and why wouldn’t you?
Introducing micro-mobility in your campus with the help of such a fleet would help the people on the campus significantly. People would save money since they don’t need to use a car for a short distance. Your campus will see a drastic reduction in congestion, moreover, its carbon footprint will reduce.
Micro-mobility is relatively new though and you would need help. You would need to select an appropriate fleet of vehicles. The people on your campus would need to find electric scooters or electric bikes for commuting, and you need to provide a solution for this.
To be more specific, you need a short-term electric bike rental app. With such an app, you will be able to easily offer micro-mobility to the people on the campus. We at Devathon have built Autorent exactly for this.
What does Autorent do and how can it help you? How does it enable you to introduce micro-mobility on your campus? We explain these in this article, however, we will touch upon a few basics first.
You are probably thinking about micro-mobility relatively recently, aren’t you? A few relevant insights about it could help you to better appreciate its importance.
Micro-mobility is a new trend in transportation, and it uses vehicles that are considerably smaller than cars. Electric scooters (e-scooters) and electric bikes (e-bikes) are the most popular forms of micro-mobility, however, there are also e-unicycles and e-skateboards.
You might have already seen e-scooters, which are kick scooters that come with a motor. Thanks to its motor, an e-scooter can achieve a speed of up to 20 km/h. On the other hand, e-bikes are popular in China and Japan, and they come with a motor, and you can reach a speed of 40 km/h.
You obviously can’t use these vehicles for very long commutes, however, what if you need to travel a short distance? Even if you have a reasonable public transport facility in the city, it might not cover the route you need to take. Take the example of a large university campus. Such a campus is often at a considerable distance from the central business district of the city where it’s located. While public transport facilities may serve the central business district, they wouldn’t serve this large campus. Currently, many people drive their cars even for short distances.
As you know, that brings its own set of challenges. Vehicular traffic adds significantly to pollution, moreover, finding a parking spot can be hard in crowded urban districts.
Well, you can reduce your carbon footprint if you use an electric car. However, electric cars are still new, and many countries are still building the necessary infrastructure for them. Your large campus might not have the necessary infrastructure for them either. Presently, electric cars don’t represent a viable option in most geographies.
As a result, you need to buy and maintain a car even if your commute is short. In addition to dealing with parking problems, you need to spend significantly on your car.
All of these factors have combined to make people sit up and think seriously about cars. Many people are now seriously considering whether a car is really the best option even if they have to commute only a short distance.
This is where micro-mobility enters the picture. When you commute a short distance regularly, e-scooters or e-bikes are viable options. You limit your carbon footprints and you cut costs!
Businesses have seen this shift in thinking, and e-scooter companies like Lime and Bird have entered this field in a big way. They let you rent e-scooters by the minute. On the other hand, start-ups like Jump and Lyft have entered the e-bike market.
Think of your campus now! The people there might need to travel short distances within the campus, and e-scooters can really help them.
What advantages can you get from micro-mobility? Let’s take a deeper look into this question.
Micro-mobility can offer several advantages to the people on your campus, e.g.:
#android app #autorent #ios app #mobile app development #app like bird #app like bounce #app like lime #autorent #bird scooter business model #bird scooter rental #bird scooter rental cost #bird scooter rental price #clone app like bird #clone app like bounce #clone app like lime #electric rental scooters #electric scooter company #electric scooter rental business #how do you start a moped #how to start a moped #how to start a scooter rental business #how to start an electric company #how to start electric scooterrental business #lime scooter business model #scooter franchise #scooter rental business #scooter rental business for sale #scooter rental business insurance #scooters franchise cost #white label app like bird #white label app like bounce #white label app like lime
1627019580
In this small post we will see how to get current url in laravel, if you want to get current page url in laravel then we can use many method such type current(), full(), request(), url().
Here i will give you all example to get current page url in laravel, in this example i have used helper and function as well as so let’s start example of how to get current url id in laravel.
#how to get current url in laravel #laravel get current url #get current page url in laravel #find current url in laravel #get full url in laravel #how to get current url id in laravel
1596955440
Recently I started using Kaggle and did my first ever competition — Titanic: Machine Learning from Disaster. This is a beginner-friendly Machine Learning competition, where the goal is to predict whether given passengers will survive or not. In this post, I will share a basic data analysis of the Titanic data set. Before working on the dataset, Let’s start with Kaggle.
Kaggle, a subsidiary of Google LLC, is an online community of data scientists and machine learning practitioners. Kaggle allows users to find and publish data sets, explore and build models in a web-based data-science environment, work with other data scientists and machine learning engineers, and enter competitions to solve data science challenges.
_Kaggle got its start in 2010 by offering machine learning competitions and now also offers a public data platform, a cloud-based workbench for data science, and Artificial Intelligence education. — _Wikipedia
The sinking of the Titanic is one of the most infamous shipwrecks in history.
On April 15, 1912, during her maiden voyage, the widely considered “unsinkable” RMS Titanic sank after colliding with an iceberg. Unfortunately, there weren’t enough lifeboats for everyone onboard, resulting in the death of 1502 out of 2224 passengers and crew.
While there was some element of luck involved in surviving, it seems some groups of people were more likely to survive than others.
In this challenge, we ask you to build a predictive model that answers the question: “what sorts of people were more likely to survive?” using passenger data (ie name, age, gender, socio-economic class, etc). — Kaggle
This post is divided in 6 Steps.
To work with Kaggle, you need a Kaggle account. You can get your free Kaggle account by clicking here and sign up on Kaggle. Once you have an account, visit the titanic competition and enroll yourself in the competition.
The Titanic competition has three data files.
The ‘gender_submission.csv’ file is provided as an example that shows how you should structure your predictions. It predicts that all female passengers survived, and all-male passengers died. Your hypothesis regarding survival will probably be different, which will lead to a different submission file. However, your submission file has to look like this file.
‘train.csv’ contains the details of a subset of the passengers on board (891 passengers, to be exact — where each passenger details are given in different row in the table)
First, you have to find a hidden pattern in ‘train.csv’, and then based on that pattern, and you have to predict whether the given 418 passengers (in ‘test.csv’) will survive or not.
## data analysis and wrangling
import pandas as pd
import numpy as np
import random as rnd
## visualization
import seaborn as sns
import matplotlib.pyplot as pltsns.set_style('dark')
%matplotlib inline
Now our packages are imported successfully. Let’s load our data.
## load train data
train_data = pd.read_csv("/kaggle/input/titanic/train.csv")
## load test data
test_data = pd.read_csv("/kaggle/input/titanic/test.csv")
Let’s have a look at our train and test data.
train_data.head()
test_data.head()
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2\. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
view raw
train_head.csv hosted with ❤ by GitHub
First of all, let’s have a look at columns.
print(train_data.columns.values)
print("\n")
print('='*50)
print("\n")
print(test_data.columns.values)
## output
['PassengerId' 'Survived' 'Pclass' 'Name' 'Sex' 'Age' 'SibSp' 'Parch' 'Ticket' 'Fare' 'Cabin' 'Embarked']
==================================================
['PassengerId' 'Pclass' 'Name' 'Sex' 'Age' 'SibSp' 'Parch' 'Ticket' 'Fare' 'Cabin' 'Embarked']
We can see that train data have 12 columns, and test data have 11 columns. For test data, we have to predict whether passengers will survive or not.
#machine-learning #beginner #python #learning #kaggle #deep learning
1596990540
In the last post, we started working on the Titanic Kaggle competition. If you haven’t read that yet, you can read that here. So in this post, we will develop predictive models using Machine Learning.
If you have followed my last post then, now our data is ready to prepare the model. There are plenty of predictive algorithms out there to try. However, our problem is the classification problem thus I will try the following classification/ regression algorithms.
To develop a machine learning model we need to import the Scikit-learn library.
_Scikit-Learn is an open source machine learning library that supports supervised and unsupervised learning. It also provides various tools for model fitting, data preprocessing, model selection and evaluation, and many other utilities. — _Scikit-Learn
Let’s import all the required algorithms from Scikit-Learn.
## machine learning
from sklearn.svm import SVC, LinearSVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
Each machine learning classification algorithms require train and test data to train and test model.
## dropping Name, Survived and PassengerId column
X_train = train_data.drop(["Name", "Survived", "PassengerId"], axis=1)
Y_train = train_data["Survived"]
X_test = test_data.drop(['Name',"PassengerId"], axis=1).copy()
X_train.shape, Y_train.shape, X_test.shape
_A support-vector machine constructs a hyperplane or set of hyperplanes in a high- or infinite-dimensional space, which can be used for classification, regression, or other tasks like outliers detection. — _Wikipedia
## Support Vector Machine
svc = SVC()
svc.fit(X_train, Y_train)
svm_Y_pred = svc.predict(X_test)
svc_accuracy = svc.score(X_train, Y_train)
svc_accuracy
## output
0.6823793490460157
_In K-NN classification, the output is a class membership. An object is classified by a plurality vote of its neighbors, with the object being assigned to the class most common among its knearest neighbors — _Wikipedia
## k-nearest neighbor
knn = KNeighborsClassifier(n_neighbors = 3)
knn.fit(X_train, Y_train)
knn_Y_pred = knn.predict(X_test)
knn_accuracy = knn.score(X_train, Y_train)
knn_accuracy
## output
0.8406285072951739
#kaggle #machine-learning #learning #python #artificial-intelligence #deep learning
1623993300
Business data is more bountiful than ever. Regardless of whether this data is gathered directly or bought from a third-party or syndicated source, it must be appropriately managed to bring organizations the most worth.
To achieve this goal, organizations are putting resources into data infrastructure and platforms, for example, data lakes and data warehouses. This investment is crucial to harnessing insights, yet it’s only essential for the solution.
Organizations are quickly embracing data-driven decision making processes. With insight-driven organizations growing multiple times quicker than their competitors, they don’t have a choice.
The gauntlet has adequately been tossed down. Either give admittance to significant data for your business, or join the developing memorial park of dinosaur organizations, incapable or reluctant to adapt to the cutting-edge digital economy
Self-service BI and analytics solutions can address this challenge by empowering business owners to access data straightforwardly and gain the insights they need. Nonetheless, just offering Self-service BI doesn’t ensure that an organization will become insights-rich and that key partners will be able to follow up on insights without contribution from technical team members.
The progress to genuinely insights-driven decisions requires a purposeful leadership effort, investment in the correct devices, and employee empowerment with the goal that leaders across capacities can counsel data independently prior to acting.
As such, organizations must take a stab at data democratization: opening up admittance to data and analytics among non-technical people without technical guards. In data democratization, the user experience must line up with the practices and needs of business owners to guarantee maximum adoption.
Data democratization means the process where one can utilize the data whenever to make decisions. In the company, everybody profits by having snappy admittance to data and the capacity to make decisions instantly.
Deploying data democratization requires data program to be self-aware; that is, with more prominent broad admittance to data, protocols should be set up to guarantee that users presented to certain data comprehend what it is they’re seeing — that nothing is misconstrued when deciphered and that overall data security itself is kept up, as more noteworthy availability to data may likewise effectively build risk to data integrity. These protections, while vital, are far exceeded by the perception of and data contribution from all edges of a company. With support empowered and encouraged across a company’s ecosystem,further knowledge becomes conceivable, driving advancement and better performance.
#big data #data management #latest news #4 key tips to get started with data democratization #data democratization #key tips to get started with data democratization