-
Notifications
You must be signed in to change notification settings - Fork 248
[DOCS] Added Data Frames subsection to ML section. #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1eccf7e
Added dataframes intro file to the ML section, amended overview.ascii…
szabosteve e4a91a3
Fixed paragraph style.
szabosteve ca68a7a
Fixed markup.
szabosteve 016d36f
Fixed markup.
szabosteve 1916513
Rephrased sentences to improve readability.
szabosteve 65f6dab
Fixed header.
szabosteve a564230
Extended the text: pivoting, aggregation, continuous data frames.
szabosteve 236ba3a
Amended the promise about continuous data frames.
szabosteve 04051ba
Fixed typo.
szabosteve 7e89296
Added simple example to the intro.
szabosteve 00e6e92
Quick fix.
szabosteve a09d80f
Amended the text based on the technical and peer reviews.
szabosteve 09246fe
Added beta tag to the page.
szabosteve 648cb7d
Improve readability.
szabosteve 0ed95f8
Adds screenshot to the example.
szabosteve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| [[ml-dataframes]] | ||
| === {dataframes-cap} | ||
|
|
||
| beta[] | ||
|
|
||
| A _{dataframe}_ is a transformation of a dataset by certain rules. You can think | ||
| of it like a spreadsheet or a data table that makes your data ready to be analyzed | ||
| and organized. | ||
|
|
||
| A lot of {es} datasets are organized as a stream of events: each event is a individual | ||
| document, e.g. a single item purchase. {dataframe-cap} pivots allow you to summarize | ||
| this data, bringing it into an organized, more analysis friendly format, e.g. | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
| summarizing all purchases of a single customer (see the example below). | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
|
|
||
| The {dataframe} feature enables you to define a _pivot_ which is a set of features | ||
| that transform the dataset into a different, more digestible format. Pivoting | ||
| results in a summary of your dataset (which is the {dataframe} itself). | ||
|
|
||
| Defining a pivot consist of two main parts. First, you select one or more fields | ||
| that your dataset will be grouped by. Principally you can select categorical | ||
| fields (terms) for grouping. You can also select numerical fields, in this case, | ||
| the field values will be bucketed using an interval you specify. | ||
|
|
||
| The second step is deciding how you want to aggregate the grouped data. When | ||
| using aggregations, you practically ask questions about the dataset. There are | ||
| different types of aggregations, each with its own purpose and output. You can | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
| learn more about the supported aggregations and group-by fields | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
| {ref}/data-frame-transform-pivot.html[here]. | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
|
|
||
| As an optional step, it's also possible to add a query to further limit the | ||
| scope of the aggregation. | ||
|
|
||
| IMPORTANT: In 7.2, you can build {dataframes} on the top of a static dataset. | ||
|
szabosteve marked this conversation as resolved.
|
||
| When new data comes into the index, you have to perform the transformation again | ||
| on the altered data. | ||
|
|
||
| .Example | ||
|
|
||
| Imagine that you run a webshop that sells clothes. Every order creates a | ||
| document that contains a unique order ID, the name and the category of the | ||
| ordered product, its price, the ordered quantity, the exact date of the order, | ||
| and some customer information (name, gender, location, etc). Your dataset | ||
| contains all the transactions from last year. | ||
|
|
||
| If you want to check the sales in the different categories in your last fiscal year, | ||
| define a {dataframe} that is grouped by the product categories (women's shoes, men's | ||
| clothing, etc.) and the order date histogram with the interval of the last year, | ||
|
szabosteve marked this conversation as resolved.
Outdated
|
||
| then set a sum aggregation on the ordered quantity. The result is a {dataframe} | ||
| pivot that shows the number of sold items in every product category in the last | ||
| year. | ||
|
|
||
|
szabosteve marked this conversation as resolved.
|
||
| IMPORTANT: Creating a {dataframe} leaves your source index intact. A new index will | ||
| be created dedicated to the {dataframe}. | ||
|
|
||
| TIP: Using {dataframes} does not require {dfeeds}. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.