-
Notifications
You must be signed in to change notification settings - Fork 254
[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 11 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,57 @@ | ||
| [[ml-dataframes]] | ||
| === {dataframes-cap} | ||
|
|
||
| {dataframes-cap} feature is available in 7.2 and later. | ||
|
|
||
| A _{dataframe}_ is a transformation of a dataset by certain rules defined during | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| the creation of the {dataframe}. You can think of it like a spreadsheet or a | ||
| data table that makes your data ready to be analyzed and organized. | ||
|
|
||
| {es} datasets consist of individual documents that have fields and | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| values in each field. This architecture makes search easy but on the other hand, | ||
| makes it hard to run analyses that require reorganized or summarized fields of | ||
| the dataset. {ml-cap} analyses need clean and transformed data and that is the | ||
| point where {dataframes} come into play. | ||
|
|
||
| To transform the data into a {dataframe}, you need to define a _pivot_. During | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pivoting, you create a set of features that transform the dataset into a | ||
| different, more digestible format to make calculations on your data. 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 calculation | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| will run against every bucket that was created this way. | ||
|
|
||
| The second step is selecting one or more aggregations to perform calculation over | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| the dataset. 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 learn more about the supported aggregations and group-by fields | ||
| here (!add a link!). | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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.
Show resolved
Hide resolved
|
||
| When new data comes into the index, you have to perform the transformation again | ||
| on the altered data. Using {dataframes} does not require {dfeeds}. | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {con-dataframes-cap} will be introduced in a later version. | ||
|
|
||
| .Example | ||
|
|
||
| Put the case that you run a webshop that sells clothes. Every order creates a | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 the documents of all the transactions from last year. | ||
szabosteve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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
Show resolved
Hide resolved
|
||
| 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.
Show resolved
Hide resolved
|
||
| IMPORTANT: Creating a {dataframe} leaves your source index intact. A new index will | ||
| be created dedicated to the {dataframe}. | ||
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.