|
43 | 43 | "source": [ |
44 | 44 | "Human Activity Recognition (HAR) using mobile data has become an important area of research and application due to the increasing ubiquity of smartphones, wearables, and other mobile devices that can collect a wealth of sensor data. HAR is a crucial task in various fields, including healthcare, fitness, workplace safety, and smart cities, where the goal is to classify human activities (e.g., walking, running, sitting) based on sensor data. Traditional methods for HAR often require substantial computational resources and complex hyperparameter tuning, making them difficult to deploy in real-time applications. TabPFN (Tabular Prior-Data Fitted Network), a Transformer-based model designed for fast and efficient classification of small tabular datasets, offers a promising solution to overcome these challenges.\n", |
45 | 45 | "\n", |
46 | | - "TabPFN’s advantages are particularly well-suited for various HAR use cases. In healthcare, it aids in fall detection for the elderly, chronic disease monitoring, providing timely interventions. For fitness and wellness, it can classify activities such as walking or running in real-time, enhancing user experience in mobile apps and wearable devices. It enhances workplace safety by identifying risky workers activities in hazardous industrial environments such as mining, oil rigs ensuring safety and reducing accidents. Furthermore, in case of smart cities and urban mobility, HAR data from pedestrians and commuters can be efficiently classified to optimize traffic flow, public transport systems, and urban planning initiatives. Additionally, HAR supports emergency response efforts during disasters by locating people in need of help. Thus TabPFN's speed, simplicity, and effectiveness make it an ideal choice for these real-time HAR applications." |
| 46 | + "TabPFN’s advantages are particularly well-suited for various HAR use cases. In healthcare, it aids in fall detection for the elderly, chronic disease monitoring, providing timely interventions. For fitness and wellness, it can classify activities such as walking or running in real-time, enhancing user experience in mobile apps and wearable devices. It enhances workplace safety by identifying risky workers' activities in hazardous industrial environments, such as in mining and on oil rigs, ensuring safety and reducing accidents. Furthermore, in the case of smart cities and urban mobility, HAR data from pedestrians and commuters can be efficiently classified to optimize traffic flow, public transport systems, and urban planning initiatives. Additionally, HAR supports emergency response efforts during disasters by locating people in need of help. TabPFN's speed, simplicity, and effectiveness make it an ideal choice for these real-time HAR applications." |
47 | 47 | ] |
48 | 48 | }, |
49 | 49 | { |
|
751 | 751 | { |
752 | 752 | "cell_type": "code", |
753 | 753 | "execution_count": 32, |
754 | | - "metadata": {}, |
| 754 | + "metadata": { |
| 755 | + "scrolled": true |
| 756 | + }, |
755 | 757 | "outputs": [ |
756 | 758 | { |
757 | 759 | "data": { |
|
1416 | 1418 | "cell_type": "markdown", |
1417 | 1419 | "metadata": {}, |
1418 | 1420 | "source": [ |
1419 | | - "In the above training dataframe we will use the `Activity` as the target label to be predicted using rest of the features as explanatory variables `X`. We define the explanatory variables as follows: " |
| 1421 | + "We define the explanatory variables as follows: In the training dataframe above we use `Activity` as the target label to be predicted, using the rest of the features as explanatory variables `X`. We define the explanatory variables as follows: " |
1420 | 1422 | ] |
1421 | 1423 | }, |
1422 | 1424 | { |
|
1446 | 1448 | "cell_type": "markdown", |
1447 | 1449 | "metadata": {}, |
1448 | 1450 | "source": [ |
1449 | | - "Once the explanatory variables `X` is defined, this is now used as input in the `prepare_tabulardata` method from the tabular learner in the `arcgis.learn`. The method takes the feature layer or a spatial dataframe containing the dataset and prepares it for fitting the model. \n", |
| 1451 | + "Once the explanatory variables `X` are defined, they are used as input in the `prepare_tabulardata` method from the tabular learner in `arcgis.learn`. The method takes the feature layer or a spatial dataframe containing the dataset and prepares it for fitting the model.\n", |
1450 | 1452 | "\n", |
1451 | | - "The input parameters required for the tool are used as shown here :" |
| 1453 | + "The input parameters required for the tool are used as follows:" |
1452 | 1454 | ] |
1453 | 1455 | }, |
1454 | 1456 | { |
|
1471 | 1473 | "cell_type": "markdown", |
1472 | 1474 | "metadata": {}, |
1473 | 1475 | "source": [ |
1474 | | - "To get a sense of what the training data looks like, the `show_batch()` method will randomly pick a few training sample and visualize them. The sample are showing the explanatory variables and the `Activity` target label to predict." |
| 1476 | + "To get a sense of what the training data looks like, the `show_batch()` method will randomly pick a few training samples and visualize them. The samples show the explanatory variables and the `Activity` target label to predict." |
1475 | 1477 | ] |
1476 | 1478 | }, |
1477 | 1479 | { |
|
2047 | 2049 | "source": [ |
2048 | 2050 | "### Accuracy assessment <a class=\"anchor\" id=\"16\"></a>\n", |
2049 | 2051 | "\n", |
2050 | | - "Here we will evaluate the model's performance. This will print out multiple model metrics. we can assess the model quality using its corresponding metrics. These metrics include a combination of multiple evaluation criteria, such as `accuracy`, `precision`, `recall` and `F1-Score`, which collectively measure the model's performance on the validation set." |
| 2052 | + "Next, we will evaluate the model's performance. This will print out multiple model metrics that we can use to assess the model quality. These metrics include a combination of multiple evaluation criteria, such as `accuracy`, `precision`, `recall` and `F1-Score`, which collectively measure the model's performance on the validation set." |
2051 | 2053 | ] |
2052 | 2054 | }, |
2053 | 2055 | { |
|
2135 | 2137 | "cell_type": "markdown", |
2136 | 2138 | "metadata": {}, |
2137 | 2139 | "source": [ |
2138 | | - "This project highlights the powerful capabilities of the TabPFN classifier for Human Activity Recognition (HAR) tasks. Even with a training dataset of just 1,020 samples, the model achieved impressive results on a larger test dataset of 6,332 samples, with an accuracy of 96.81%, precision, recall, and F1 score all reaching 0.97. The TabPFN model's speed, simplicity, and strong performance in classifying human activities, highlight its potential for applications in healthcare, fitness, smart cities and disaster relief operations, offering an efficient and scalable solution for HAR systems." |
| 2140 | + "This project highlights the powerful capabilities of the TabPFN classifier for Human Activity Recognition (HAR) tasks. Even with a training dataset of just 1,020 samples, the model achieved impressive results on a larger test dataset of 6,332 samples, with an accuracy of 96.81%, and precision, recall, and F1 scores all reaching 0.97. The TabPFN model's speed, simplicity, and strong performance in classifying human activities, highlight its potential for applications in healthcare, fitness, smart cities and disaster relief operations, offering an efficient and scalable solution for HAR systems." |
2139 | 2141 | ] |
2140 | 2142 | }, |
2141 | 2143 | { |
|
2157 | 2159 | ], |
2158 | 2160 | "metadata": { |
2159 | 2161 | "kernelspec": { |
2160 | | - "display_name": "pro3.4_climaxAug2024", |
| 2162 | + "display_name": "pro3.5_LearnLesson2025", |
2161 | 2163 | "language": "python", |
2162 | | - "name": "pro3.4_climaxaug2024" |
| 2164 | + "name": "pro3.5_learnlesson2025" |
2163 | 2165 | }, |
2164 | 2166 | "language_info": { |
2165 | 2167 | "codemirror_mode": { |
|
2171 | 2173 | "name": "python", |
2172 | 2174 | "nbconvert_exporter": "python", |
2173 | 2175 | "pygments_lexer": "ipython3", |
2174 | | - "version": "3.11.8" |
| 2176 | + "version": "3.11.11" |
2175 | 2177 | } |
2176 | 2178 | }, |
2177 | 2179 | "nbformat": 4, |
|
0 commit comments