Skip to content
Snippets Groups Projects
Commit 43f48c26 authored by sr1009's avatar sr1009
Browse files

commit

parent 5fdf94b6
Branches
No related tags found
No related merge requests found
No preview for this file type
%% Cell type:code id: tags:
``` python
import pandas as pd
import os
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
path = 'HGS/3213/'
directories = os.listdir(path)
columns = ['s'+str(i) for i in range(1,19)]
columns = ['instance','cost_solution'] + columns
```
%% Cell type:code id: tags:
``` python
dfs = [pd.read_csv(path + i, sep=';',names = columns) for i in directories]
df = pd.concat(dfs)
df.head()
df_3213 = pd.concat(dfs)
df_3213.head()
```
%% Output
instance cost_solution s1 s2 s3 s4 s5 \
0 XML100_3213_01 22793 136.101 93.2145 0.0566 0.0419 987.636
1 XML100_3213_01 22504 180.084 110.4310 0.0712 0.0528 1055.800
2 XML100_3213_01 21594 233.753 189.6580 0.0967 0.0878 986.200
3 XML100_3213_01 22866 107.146 45.6872 0.0567 0.0560 1002.450
4 XML100_3213_01 22756 150.963 97.8176 0.0596 0.0459 976.273
s6 s7 s8 s9 s10 s11 s12 s13 s14 \
0 342.830 0 847.909 0.3881 0.1454 1421.36 0.3657 0.1828 0.2584
1 296.176 0 902.200 0.3873 0.1777 1358.10 0.2000 0.1000 0.0000
2 361.022 0 818.400 0.3592 0.1083 1472.60 0.2000 0.1000 0.0000
3 340.854 0 826.818 0.3789 0.1060 1483.09 0.3657 0.1828 0.2584
4 339.827 0 834.636 0.3861 0.1338 1427.09 0.3657 0.1828 0.2584
s15 s16 s17 s18
0 696.380 506.898 2.5745 5.2841
1 613.798 462.556 0.0000 6.7722
2 753.834 484.767 0.0000 5.5556
3 682.954 516.207 2.5745 5.0379
4 697.418 507.348 2.5745 5.0360
%% Cell type:code id: tags:
``` python
#Drop column SO7
```
%% Cell type:code id: tags:
``` python
df_3213 = df_3213.rename({'instance': 'Instance_name',
'cost_solution': 'Cost_of_the_solution',
's1':'S01',
's2': 'S02',
's3': 'S03',
's4': 'S04',
's5': 'S05',
's6': 'S06',
's7': 'S07',
's8': 'S08',
's9': 'S09',
's10': 'S10',
's11': 'S11',
's12': 'S12',
's13': 'S13',
's14': 'S14',
's15': 'S15',
's16': 'S16',
's17': 'S17',
's18': 'S18'}, axis=1)
```
%% Cell type:code id: tags:
``` python
df_3213.head()
```
%% Output
Instance_name Cost_of_the_solution S01 S02 S03 S04 \
0 XML100_3213_01 22793 136.101 93.2145 0.0566 0.0419
1 XML100_3213_01 22504 180.084 110.4310 0.0712 0.0528
2 XML100_3213_01 21594 233.753 189.6580 0.0967 0.0878
3 XML100_3213_01 22866 107.146 45.6872 0.0567 0.0560
4 XML100_3213_01 22756 150.963 97.8176 0.0596 0.0459
S05 S06 S07 S08 S09 S10 S11 S12 S13 \
0 987.636 342.830 0 847.909 0.3881 0.1454 1421.36 0.3657 0.1828
1 1055.800 296.176 0 902.200 0.3873 0.1777 1358.10 0.2000 0.1000
2 986.200 361.022 0 818.400 0.3592 0.1083 1472.60 0.2000 0.1000
3 1002.450 340.854 0 826.818 0.3789 0.1060 1483.09 0.3657 0.1828
4 976.273 339.827 0 834.636 0.3861 0.1338 1427.09 0.3657 0.1828
S14 S15 S16 S17 S18
0 0.2584 696.380 506.898 2.5745 5.2841
1 0.0000 613.798 462.556 0.0000 6.7722
2 0.0000 753.834 484.767 0.0000 5.5556
3 0.2584 682.954 516.207 2.5745 5.0379
4 0.2584 697.418 507.348 2.5745 5.0360
%% Cell type:code id: tags:
``` python
# Get the shape of the dataframe
print(f'Dataset shape:\n{df_3213.shape}\n')
# Get the names of the attributes
print(f'Dataset attributes:\n{df_3213.columns}\n')
# Get the overall description of the dataset with the data types
print(f'Dataset general information:\n{df_3213.info()}\n')
# Get description of numerical attributes
print(f'Dataset description:\nNumerical Data\n{df_3213.describe()}\n')
# Get description of categorical attributes
print(f'Dataset description:\nCategorical Data\n{df_3213.describe(include = object)}')
```
%% Output
Dataset shape:
(4132400, 20)
Dataset attributes:
Index(['Instance_name', 'Cost_of_the_solution', 'S01', 'S02', 'S03', 'S04',
'S05', 'S06', 'S07', 'S08', 'S09', 'S10', 'S11', 'S12', 'S13', 'S14',
'S15', 'S16', 'S17', 'S18'],
dtype='object')
<class 'pandas.core.frame.DataFrame'>
Int64Index: 4132400 entries, 0 to 139033
Data columns (total 20 columns):
# Column Dtype
--- ------ -----
0 Instance_name object
1 Cost_of_the_solution int64
2 S01 float64
3 S02 float64
4 S03 float64
5 S04 float64
6 S05 float64
7 S06 float64
8 S07 int64
9 S08 float64
10 S09 float64
11 S10 float64
12 S11 float64
13 S12 float64
14 S13 float64
15 S14 float64
16 S15 float64
17 S16 float64
18 S17 float64
19 S18 float64
dtypes: float64(17), int64(2), object(1)
memory usage: 662.1+ MB
Dataset general information:
None
Dataset description:
Numerical Data
Cost_of_the_solution S01 S02 S03 \
count 4.132400e+06 4.132400e+06 4.132400e+06 4.132400e+06
mean 1.999346e+04 1.320380e+02 9.000354e+01 5.504277e-02
std 3.379610e+03 3.152291e+01 3.391581e+01 1.635940e-02
min 1.161500e+04 5.332490e+01 1.762830e+01 1.790000e-02
25% 1.720800e+04 1.091680e+02 6.405680e+01 4.370000e-02
50% 2.036800e+04 1.336220e+02 8.401930e+01 5.530000e-02
75% 2.256600e+04 1.543540e+02 1.124180e+02 6.480000e-02
max 2.758800e+04 3.495290e+02 3.789620e+02 1.843000e-01
S04 S05 S06 S07 S08 \
count 4.132400e+06 4.132400e+06 4.132400e+06 4132400.0 4.132400e+06
mean 3.900560e-02 8.356010e+02 2.192106e+02 0.0 7.059436e+02
std 1.829580e-02 1.296117e+02 9.358354e+01 0.0 1.323455e+02
min 3.500000e-03 4.877270e+02 5.608920e+01 0.0 3.611820e+02
25% 2.580000e-02 7.778460e+02 1.392130e+02 0.0 6.562500e+02
50% 3.600000e-02 8.635380e+02 2.114230e+02 0.0 7.319000e+02
75% 4.810000e-02 9.276000e+02 2.914100e+02 0.0 7.875830e+02
max 2.294000e-01 1.099200e+03 4.305820e+02 0.0 9.790830e+02
S09 S10 S11 S12 S13 \
count 4.132400e+06 4.132400e+06 4.132400e+06 4.132400e+06 4.132400e+06
mean 3.985144e-01 8.121530e-02 1.314749e+03 2.976809e-01 1.488366e-01
std 2.918490e-02 2.643881e-02 2.642881e+02 6.631182e-02 3.315633e-02
min 3.024000e-01 3.130000e-02 6.179170e+02 2.000000e-01 1.000000e-01
25% 3.731000e-01 6.230000e-02 1.204920e+03 2.444000e-01 1.222000e-01
50% 3.988000e-01 7.860000e-02 1.355300e+03 2.692000e-01 1.346000e-01
75% 4.195000e-01 9.440000e-02 1.476900e+03 3.657000e-01 1.828000e-01
max 4.654000e-01 2.514000e-01 1.856000e+03 5.333000e-01 2.667000e-01
S14 S15 S16 S17 S18
count 4.132400e+06 4.132400e+06 4.132400e+06 4.132400e+06 4.132400e+06
mean 1.324379e-01 4.808405e+02 3.699737e+02 1.807382e+00 4.453170e+00
std 1.118187e-01 1.861478e+02 1.023027e+02 9.128615e-01 6.878613e-01
min 0.000000e+00 1.296500e+02 1.334920e+02 0.000000e+00 2.321400e+00
25% 2.560000e-02 3.332420e+02 3.155990e+02 1.065900e+00 3.955000e+00
50% 1.072000e-01 4.773045e+02 3.763700e+02 2.108600e+00 4.377300e+00
75% 2.457000e-01 6.349270e+02 4.536340e+02 2.366400e+00 4.890600e+00
max 3.503000e-01 9.045720e+02 5.466440e+02 3.824700e+00 9.945000e+00
Dataset description:
Categorical Data
Instance_name
count 4132400
unique 26
top XML100_3213_24
freq 247704
%% Cell type:code id: tags:
``` python
```
......
......@@ -44,49 +44,6 @@ Use the built-in continuous integration in GitLab.
***
# Editing this README
## How to download Data?
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
use this link : https://moodle.imt-atlantique.fr/mod/resource/view.php?id=28972
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment