Loading...

vastorbit.datasets.gen_meshgrid

vastorbit.datasets.gen_meshgrid(features_ranges: dict) VastFrame

Generates a dataset using regular steps.

Parameters:

features_ranges (dict) –

Dictionary including the features types and ranges.

  • For str:

    The subdictionary must include two keys: “type” must be set to ‘str’ and ‘value’ must include the feature categories.

  • For int:

    The subdictionary must include two keys: “type” must be set to ‘int’ and ‘range’ must include two integers that represent the lower and the upper bounds.

  • For float:

    The subdictionary must include two keys: “type” must be set to ‘float’ and ‘range’ must include two floats that represent the lower and the upper bounds.

  • For date:

    The subdictionary must include two keys: “type” must be set to ‘date’ and ‘range’ must include the start date and the number of days after.

  • For datetime:

    The subdictionary must include two keys: “type” must be set to ‘date’ and ‘range’ must include the start date and the number of days after.

Numerical and date-like features must have an extra key in the dictionary named ‘nbins’, which corresponds to the number of bins used to compute the different categories.

Returns:

Generated dataset.

Return type:

VastFrame

Examples

import datetime

from vastorbit.datasets import gen_meshgrid

gen_meshgrid(
    features_ranges = {
        "name": {"type": str, "values": ["Badr", "Raghu", "Waqas",]},
        "age": {"type": int, "range": [20, 40]},
        "distance": {"type": float, "range": [1000, 4000]},
        "date": {"type": datetime.date, "range": ["1993-11-03", 365]},
    },
)
Abc
name
Varchar(5)
123
age
Integer
123
distance
Double
📅
datetime
Timestamp(3)
1Badr201000.01993-11-03 00:00:00
2Badr201000.01993-11-03 00:00:00
3Badr201000.01993-11-03 00:00:00
4Badr211000.01993-11-03 00:00:00
5Badr211000.01993-11-03 00:00:00
6Badr211000.01993-11-03 00:00:00
7Badr211000.01993-11-03 00:00:00
8Badr211000.01993-11-03 00:00:00
9Badr221000.01993-11-03 00:00:00
10Badr221000.01993-11-03 00:00:00
11Badr221000.01993-11-03 00:00:00
12Badr221000.01993-11-03 00:00:00
13Badr221000.01993-11-03 00:00:00
14Badr231000.01993-11-03 00:00:00
15Badr231000.01993-11-03 00:00:00
16Badr231000.01993-11-03 00:00:00
17Badr231000.01993-11-03 00:00:00
18Badr231000.01993-11-03 00:00:00
19Badr241000.01993-11-03 00:00:00
20Badr241000.01993-11-03 00:00:00
21Badr241000.01993-11-03 00:00:00
22Badr241000.01993-11-03 00:00:00
23Badr241000.01993-11-03 00:00:00
24Badr251000.01993-11-03 00:00:00
25Badr251000.01993-11-03 00:00:00
26Badr251000.01993-11-03 00:00:00
27Badr251000.01993-11-03 00:00:00
28Badr251000.01993-11-03 00:00:00
29Badr261000.01993-11-03 00:00:00
30Badr261000.01993-11-03 00:00:00
31Badr261000.01993-11-03 00:00:00
32Badr261000.01993-11-03 00:00:00
33Badr261000.01993-11-03 00:00:00
34Badr271000.01993-11-03 00:00:00
35Badr271000.01993-11-03 00:00:00
36Badr271000.01993-11-03 00:00:00
37Badr271000.01993-11-03 00:00:00
38Badr271000.01993-11-03 00:00:00
39Badr281000.01993-11-03 00:00:00
40Badr281000.01993-11-03 00:00:00
41Badr281000.01993-11-03 00:00:00
42Badr281000.01993-11-03 00:00:00
43Badr281000.01993-11-03 00:00:00
44Badr291000.01993-11-03 00:00:00
45Badr291000.01993-11-03 00:00:00
46Badr291000.01993-11-03 00:00:00
47Badr291000.01993-11-03 00:00:00
48Badr291000.01993-11-03 00:00:00
49Badr301000.01993-11-03 00:00:00
50Badr301000.01993-11-03 00:00:00
51Badr301000.01993-11-03 00:00:00
52Badr301000.01993-11-03 00:00:00
53Badr301000.01993-11-03 00:00:00
54Badr311000.01993-11-03 00:00:00
55Badr311000.01993-11-03 00:00:00
56Badr311000.01993-11-03 00:00:00
57Badr311000.01993-11-03 00:00:00
58Badr311000.01993-11-03 00:00:00
59Badr321000.01993-11-03 00:00:00
60Badr321000.01993-11-03 00:00:00
61Badr321000.01993-11-03 00:00:00
62Badr321000.01993-11-03 00:00:00
63Badr321000.01993-11-03 00:00:00
64Badr331000.01993-11-03 00:00:00
65Badr331000.01993-11-03 00:00:00
66Badr331000.01993-11-03 00:00:00
67Badr331000.01993-11-03 00:00:00
68Badr331000.01993-11-03 00:00:00
69Badr341000.01993-11-03 00:00:00
70Badr341000.01993-11-03 00:00:00
71Badr341000.01993-11-03 00:00:00
72Badr341000.01993-11-03 00:00:00
73Badr341000.01993-11-03 00:00:00
74Badr351000.01993-11-03 00:00:00
75Badr351000.01993-11-03 00:00:00
76Badr351000.01993-11-03 00:00:00
77Badr351000.01993-11-03 00:00:00
78Badr351000.01993-11-03 00:00:00
79Badr361000.01993-11-03 00:00:00
80Badr361000.01993-11-03 00:00:00
81Badr361000.01993-11-03 00:00:00
82Badr361000.01993-11-03 00:00:00
83Badr361000.01993-11-03 00:00:00
84Badr371000.01993-11-03 00:00:00
85Badr371000.01993-11-03 00:00:00
86Badr371000.01993-11-03 00:00:00
87Badr371000.01993-11-03 00:00:00
88Badr371000.01993-11-03 00:00:00
89Badr381000.01993-11-03 00:00:00
90Badr381000.01993-11-03 00:00:00
91Badr381000.01993-11-03 00:00:00
92Badr381000.01993-11-03 00:00:00
93Badr381000.01993-11-03 00:00:00
94Badr391000.01993-11-03 00:00:00
95Badr391000.01993-11-03 00:00:00
96Badr391000.01993-11-03 00:00:00
97Badr391000.01993-11-03 00:00:00
98Badr391000.01993-11-03 00:00:00
99Badr401000.01993-11-03 00:00:00
100Badr401000.01993-11-03 00:00:00
Rows: 1-100 | Columns: 4