tfugnashik / examples

This repo contains examples to implement Machine Learning algorithms
11 stars 8 forks source link

Add Titanic_Dataset Example #4

Closed sachinkhote closed 1 year ago

sachinkhote commented 1 year ago

I have created this pull request to contribute my dataset to the project.

Changes Made:

Files Added: titanic_survival.ipynb : Jupyter Notebook containing code for data analysis and predictions. dataset.csv: Dataset file containing the raw data used in the analysis. README.md: Updated README file providing an overview of the project and dataset details.

pranavvp16 commented 1 year ago

awesome @sachinkhote you just need to change few things, instead of pushing the whole dataset to this repo write a code block in your notebook that will download the csv file, it should be something like this

import requests
url = <url to the dataset>
request.get(url)

this will download the dataset and you can remove the dataset file safely from this PR.

sachinkhote commented 1 year ago

Changes Made:

titanic_survival.ipynb : Jupyter Notebook is updated according to the changes requested. dataset.csv: Dataset file removed successfully from the repo

pranavvp16 commented 1 year ago

@sachinkhote you need to add code block to download the dataset

import requests

# Set the URL of the raw file on GitHub
github_raw_url = 'https://github.com/AutoViML/Auto_TS/blob/master/example_datasets/Sales_and_Marketing.csv'

# Set the file name you want to save
filename = 'downloaded_file.csv'

# Send an HTTP GET request to the raw file URL
response = requests.get(github_raw_url)

# Check if the request was successful (status code 200)
if response.status_code == 200:
    with open(filename, 'wb') as file:
        file.write(response.content)
    print(f"File '{filename}' has been downloaded.")
else:
    print(f"Failed to download the file. Status code: {response.status_code}")

Like in the above code I'm downloading the file from github repo

pranavvp16 commented 1 year ago

Awesome @sachinkhote we can merge now , Thanks !

sachinkhote commented 1 year ago

suggested Changes Made in the whole dataset