diff --git "a/space/space/.ipynb_checkpoints/main_model-checkpoint.ipynb" "b/space/space/.ipynb_checkpoints/main_model-checkpoint.ipynb" new file mode 100644--- /dev/null +++ "b/space/space/.ipynb_checkpoints/main_model-checkpoint.ipynb" @@ -0,0 +1,2501 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "e25090fa-f990-4f1a-84f3-b12159eedae8", + "metadata": {}, + "source": [ + "# Implement and test prediciton model" + ] + }, + { + "cell_type": "markdown", + "id": "3bbee2e4-55c8-4b06-9929-72026edf7932", + "metadata": {}, + "source": [ + "## Prerequisites" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "f8c28d2d-8458-49fd-8ebf-5e729d6e861f", + "metadata": {}, + "outputs": [], + "source": [ + "# Prerequisites\n", + "from tabulate import tabulate\n", + "from transformers import pipeline\n", + "import json\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import pickle\n", + "import os\n", + "import time\n", + "import math\n", + "\n", + "# get candidate labels\n", + "with open(\"packing_label_structure.json\", \"r\") as file:\n", + " candidate_labels = json.load(file)\n", + "keys_list = list(candidate_labels.keys())\n", + "\n", + "# Load test data (in list of dictionaries)\n", + "with open(\"test_data.json\", \"r\") as file:\n", + " packing_data = json.load(file)\n", + "# Extract all trip descriptions and trip_types\n", + "trip_descriptions = [trip['description'] for trip in packing_data]\n", + "trip_types = [trip['trip_types'] for trip in packing_data]\n", + "\n", + "# Access the first trip description\n", + "first_trip = trip_descriptions[0]\n", + "# Get the packing list for the secondfirst trip\n", + "first_trip_type = trip_types[0]\n", + "\n", + "# print(f\"First trip: {first_trip} \\n\")\n", + "# print(f\"Trip type: {first_trip_type}\")" + ] + }, + { + "cell_type": "markdown", + "id": "5cf4f76f-0035-44e8-93af-52eafaec686e", + "metadata": {}, + "source": [ + "**All trip descriptions**" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "89d42ca7-e871-4eda-b428-69e9bd965428", + "metadata": { + "jupyter": { + "source_hidden": true + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0 . I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands. \n", + "\n", + "beach vacation\n", + "['swimming', 'going to the beach', 'relaxing', 'hiking']\n", + "warm destination / summer\n", + "lightweight (but comfortable)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "no special conditions to consider\n", + "7+ days\n", + "\n", + "\n", + "1 . We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train. \n", + "\n", + "city trip\n", + "['sightseeing']\n", + "variable weather / spring / autumn\n", + "luxury (including evening wear)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "no special conditions to consider\n", + "3 days\n", + "\n", + "\n", + "2 . My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany. \n", + "\n", + "city trip\n", + "['relaxing']\n", + "cold destination / winter\n", + "lightweight (but comfortable)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "no special conditions to consider\n", + "7+ days\n", + "\n", + "\n", + "3 . I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August. \n", + "\n", + "cultural exploration\n", + "['sightseeing', 'hiking', 'rafting']\n", + "variable weather / spring / autumn\n", + "lightweight (but comfortable)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "rainy climate\n", + "7+ days\n", + "\n", + "\n", + "4 . We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation. \n", + "\n", + "nature escape\n", + "['swimming', 'relaxing', 'hiking']\n", + "warm destination / summer\n", + "lightweight (but comfortable)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "no special conditions to consider\n", + "7+ days\n", + "\n", + "\n", + "5 . I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days. \n", + "\n", + "long-distance hike / thru-hike\n", + "['going to the beach']\n", + "tropical / humid\n", + "minimalist\n", + "casual\n", + "huts with half board\n", + "own vehicle\n", + "off-grid / no electricity\n", + "6 days\n", + "\n", + "\n", + "6 . I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks. \n", + "\n", + "beach vacation\n", + "['stand-up paddleboarding (SUP)', 'surfing']\n", + "cold destination / winter\n", + "ultralight\n", + "casual\n", + "sleeping in a tent\n", + "own vehicle\n", + "off-grid / no electricity\n", + "6 days\n", + "\n", + "\n", + "7 . We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels. \n", + "\n", + "yoga / wellness retreat\n", + "['hut-to-hut hiking', 'yoga']\n", + "cold destination / winter\n", + "lightweight (but comfortable)\n", + "formal (business trip)\n", + "sleeping in a tent\n", + "no own vehicle\n", + "avalanche-prone terrain\n", + "7 days\n", + "\n", + "\n", + "8 . I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days. \n", + "\n", + "ski tour / skitour\n", + "['ski touring', 'photography', 'swimming']\n", + "cold destination / winter\n", + "minimalist\n", + "conservative\n", + "indoor\n", + "no own vehicle\n", + "avalanche-prone terrain\n", + "5 days\n", + "\n", + "\n", + "9 . We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days. \n", + "\n", + "camping trip (wild camping)\n", + "['scuba diving', 'kayaking / canoeing']\n", + "tropical / humid\n", + "lightweight (but comfortable)\n", + "conservative\n", + "sleeping in a tent\n", + "own vehicle\n", + "no special conditions to consider\n", + "3 days\n", + "\n", + "\n" + ] + } + ], + "source": [ + "for i, item in enumerate(trip_descriptions):\n", + " print(i, \".\", item, \"\\n\")\n", + " for elem in trip_types[i]:\n", + " print(elem)\n", + " print(\"\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "0f60c54b-affc-4d9a-acf1-da70f68c5578", + "metadata": {}, + "source": [ + "**Functions**" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "fac51224-9575-4b4b-8567-4ad4e759ecc9", + "metadata": {}, + "outputs": [], + "source": [ + "# function that returns pandas data frame with predictions\n", + "\n", + "cut_off = 0.5 # used to choose which activities are relevant\n", + "\n", + "def pred_trip(model_name, trip_descr, trip_type, cut_off):\n", + " classifier = pipeline(\"zero-shot-classification\", model=model_name)\n", + " # Create an empty DataFrame with specified columns\n", + " df = pd.DataFrame(columns=['superclass', 'pred_class'])\n", + " for i, key in enumerate(keys_list):\n", + " if key == 'activities':\n", + " result = classifier(trip_descr, candidate_labels[key], multi_label=True)\n", + " indices = [i for i, score in enumerate(result['scores']) if score > cut_off]\n", + " classes = [result['labels'][i] for i in indices]\n", + " else:\n", + " result = classifier(trip_descr, candidate_labels[key])\n", + " classes = result[\"labels\"][0]\n", + " print(result)\n", + " print(classes)\n", + " print(i)\n", + " df.loc[i] = [key, classes]\n", + " df['true_class'] = trip_type\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "b36ab806-2f35-4950-ac5a-7c192190cba7", + "metadata": {}, + "outputs": [], + "source": [ + "# function for accuracy, perc true classes identified and perc wrong pred classes\n", + "\n", + "def perf_measure(df):\n", + " df['same_value'] = df['pred_class'] == df['true_class']\n", + " correct = sum(df.loc[df.index != 1, 'same_value'])\n", + " total = len(df['same_value'])\n", + " accuracy = correct/total\n", + " pred_class = df.loc[df.index == 1, 'pred_class'].iloc[0]\n", + " true_class = df.loc[df.index == 1, 'true_class'].iloc[0]\n", + " correct = [label for label in pred_class if label in true_class]\n", + " num_correct = len(correct)\n", + " correct_perc = num_correct/len(true_class)\n", + " num_pred = len(pred_class)\n", + " if num_pred == 0:\n", + " wrong_perc = math.nan\n", + " else:\n", + " wrong_perc = (num_pred - num_correct)/num_pred\n", + " df_perf = pd.DataFrame({\n", + " 'accuracy': [accuracy],\n", + " 'true_ident': [correct_perc],\n", + " 'false_pred': [wrong_perc]\n", + " })\n", + " return(df_perf)" + ] + }, + { + "cell_type": "markdown", + "id": "c10aa57d-d7ed-45c7-bdf5-29af193c7fd5", + "metadata": {}, + "source": [ + "## Make predictions for many models and trip descriptions\n", + "\n", + "Provide a list of candidate models and apply them to the test data." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "dd7869a8-b436-40de-9ea0-28eb4b7d3248", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Using model: cross-encoder/nli-deberta-v3-base\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['micro-adventure / weekend trip', 'digital nomad trip', 'beach vacation', 'festival trip', 'city trip', 'cultural exploration', 'road trip (car/camper)', 'camping trip (wild camping)', 'long-distance hike / thru-hike', 'hut trek (winter)', 'ski tour / skitour', 'snowboard / splitboard trip', 'nature escape', 'yoga / wellness retreat', 'hut trek (summer)', 'camping trip (campground)'], 'scores': [0.9722680449485779, 0.007802918087691069, 0.0075571718625724316, 0.0022959215566515923, 0.0021305829286575317, 0.001222927705384791, 0.0009879637509584427, 0.000805296644102782, 0.0007946204277686775, 0.0007107199053280056, 0.0007009899127297103, 0.0006353880744427443, 0.0005838185315951705, 0.0005424902774393559, 0.0004807499353773892, 0.0004804217896889895]}\n", + "micro-adventure / weekend trip\n", + "0\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['going to the beach', 'sightseeing', 'relaxing', 'hiking', 'hut-to-hut hiking', 'stand-up paddleboarding (SUP)', 'photography', 'biking', 'running', 'ski touring', 'snowshoe hiking', 'yoga', 'kayaking / canoeing', 'horseback riding', 'rafting', 'paragliding', 'cross-country skiing', 'surfing', 'skiing', 'ice climbing', 'fishing', 'snorkeling', 'swimming', 'rock climbing', 'scuba diving'], 'scores': [0.4660525321960449, 0.007281942293047905, 0.003730606520548463, 0.0001860307966126129, 0.00014064949937164783, 0.00011034693307010457, 5.2949126256862655e-05, 3.828677654382773e-05, 3.396756437723525e-05, 1.5346524378401227e-05, 9.348185812996235e-06, 8.182429155567661e-06, 6.5973340497293975e-06, 6.271920938161202e-06, 5.544673058466287e-06, 5.299102667777333e-06, 4.855380211665761e-06, 4.506250661506783e-06, 3.949530764657538e-06, 3.730233856913401e-06, 3.297281637060223e-06, 3.0508665531669976e-06, 2.933618134193239e-06, 2.6379277642263332e-06, 2.2992651338427095e-06]}\n", + "[]\n", + "1\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['variable weather / spring / autumn', 'warm destination / summer', 'cold destination / winter', 'rainy climate', 'dry / desert-like', 'tropical / humid'], 'scores': [0.5463300943374634, 0.16045652329921722, 0.10073684900999069, 0.07946548610925674, 0.06506938487291336, 0.047941628843545914]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['minimalist', 'ultralight', 'luxury (including evening wear)', 'lightweight (but comfortable)'], 'scores': [0.6965053081512451, 0.11270010471343994, 0.10676420480012894, 0.08403033763170242]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['casual', 'formal (business trip)', 'conservative'], 'scores': [0.6362482309341431, 0.22082458436489105, 0.14292724430561066]}\n", + "casual\n", + "4\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['indoor', 'sleeping in a tent', 'huts with half board', 'sleeping in a car'], 'scores': [0.435793399810791, 0.20242486894130707, 0.19281964004039764, 0.16896207630634308]}\n", + "indoor\n", + "5\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['no own vehicle', 'own vehicle'], 'scores': [0.9987181425094604, 0.0012818538816645741]}\n", + "no own vehicle\n", + "6\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['travel with children', 'self-supported (bring your own cooking gear)', 'off-grid / no electricity', 'no special conditions to consider', 'snow and ice', 'snow, ice and avalanche-prone terrain', 'pet-friendly', 'high alpine terrain'], 'scores': [0.2443356215953827, 0.20383375883102417, 0.14710737764835358, 0.1429106593132019, 0.09568475931882858, 0.09322812408208847, 0.03845797851681709, 0.03444178029894829]}\n", + "travel with children\n", + "7\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['7+ days', '2 days', '1 day', '7 days', '5 days', '3 days', '6 days', '4 days'], 'scores': [0.4730822443962097, 0.1168912723660469, 0.10058756172657013, 0.0991850346326828, 0.05424537882208824, 0.053677864372730255, 0.051554784178733826, 0.050775907933712006]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type micro-adventure / weekend trip \n", + "1 activities [] \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation no own vehicle \n", + "7 special_conditions travel with children \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 beach vacation \n", + "1 [swimming, going to the beach, relaxing, hiking] \n", + "2 warm destination / summer \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.0 NaN\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['city trip', 'micro-adventure / weekend trip', 'festival trip', 'digital nomad trip', 'cultural exploration', 'ski tour / skitour', 'hut trek (summer)', 'hut trek (winter)', 'camping trip (campground)', 'long-distance hike / thru-hike', 'beach vacation', 'snowboard / splitboard trip', 'camping trip (wild camping)', 'road trip (car/camper)', 'nature escape', 'yoga / wellness retreat'], 'scores': [0.7273069024085999, 0.16893576085567474, 0.0374605655670166, 0.013699190691113472, 0.010825436562299728, 0.009758710861206055, 0.007331428118050098, 0.004068635869771242, 0.003749603172764182, 0.003352535655722022, 0.0031235795468091965, 0.0026630775537341833, 0.0025940865743905306, 0.002538869855925441, 0.0018098815344274044, 0.0007818263256922364]}\n", + "city trip\n", + "0\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['relaxing', 'sightseeing', 'photography', 'running', 'yoga', 'hiking', 'ski touring', 'biking', 'going to the beach', 'rafting', 'horseback riding', 'swimming', 'skiing', 'hut-to-hut hiking', 'stand-up paddleboarding (SUP)', 'cross-country skiing', 'kayaking / canoeing', 'paragliding', 'surfing', 'snowshoe hiking', 'scuba diving', 'ice climbing', 'snorkeling', 'rock climbing', 'fishing'], 'scores': [0.8136454820632935, 0.7140676379203796, 0.6170756220817566, 0.05222179368138313, 0.004323678556829691, 0.00038644394953735173, 0.00017300622130278498, 0.00015315462951548398, 0.00010445844964124262, 6.36487384326756e-05, 4.631545380107127e-05, 3.839404962491244e-05, 3.114979335805401e-05, 2.5509923943900503e-05, 2.4492410375387408e-05, 2.280416083522141e-05, 2.255491381220054e-05, 2.068510184471961e-05, 1.266321760340361e-05, 1.1330040251777973e-05, 8.723225619178265e-06, 8.310731573146768e-06, 6.998459411988733e-06, 6.519879661937011e-06, 5.990766112518031e-06]}\n", + "['relaxing', 'sightseeing', 'photography']\n", + "1\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['warm destination / summer', 'variable weather / spring / autumn', 'cold destination / winter', 'tropical / humid', 'rainy climate', 'dry / desert-like'], 'scores': [0.2882528007030487, 0.2644135057926178, 0.19858866930007935, 0.09457410126924515, 0.09138277918100357, 0.06278812885284424]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['luxury (including evening wear)', 'lightweight (but comfortable)', 'minimalist', 'ultralight'], 'scores': [0.4169069826602936, 0.4114149212837219, 0.12663574516773224, 0.04504229500889778]}\n", + "luxury (including evening wear)\n", + "3\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.8982668519020081, 0.06863681226968765, 0.03309635445475578]}\n", + "casual\n", + "4\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['indoor', 'huts with half board', 'sleeping in a car', 'sleeping in a tent'], 'scores': [0.714741587638855, 0.23251301050186157, 0.03547109663486481, 0.017274310812354088]}\n", + "indoor\n", + "5\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['no own vehicle', 'own vehicle'], 'scores': [0.9801605343818665, 0.019839433953166008]}\n", + "no own vehicle\n", + "6\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['pet-friendly', 'travel with children', 'self-supported (bring your own cooking gear)', 'no special conditions to consider', 'high alpine terrain', 'off-grid / no electricity', 'snow, ice and avalanche-prone terrain', 'snow and ice'], 'scores': [0.334042489528656, 0.16580866277217865, 0.12393084913492203, 0.10801968723535538, 0.08762889355421066, 0.06602469086647034, 0.06402742117643356, 0.05051736533641815]}\n", + "pet-friendly\n", + "7\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['3 days', '7+ days', '4 days', '7 days', '5 days', '6 days', '2 days', '1 day'], 'scores': [0.4001774787902832, 0.1674569994211197, 0.09989149123430252, 0.09311039745807648, 0.07716208696365356, 0.06582564115524292, 0.051743343472480774, 0.04463256150484085]}\n", + "3 days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type city trip \n", + "1 activities [relaxing, sightseeing, photography] \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort luxury (including evening wear) \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation no own vehicle \n", + "7 special_conditions pet-friendly \n", + "8 trip_length_days 3 days \n", + "\n", + " true_class \n", + "0 city trip \n", + "1 [sightseeing] \n", + "2 variable weather / spring / autumn \n", + "3 luxury (including evening wear) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 3 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.0 NaN\n", + "0 0.666667 1.0 0.666667\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['city trip', 'ski tour / skitour', 'micro-adventure / weekend trip', 'festival trip', 'cultural exploration', 'road trip (car/camper)', 'long-distance hike / thru-hike', 'digital nomad trip', 'camping trip (campground)', 'hut trek (winter)', 'beach vacation', 'nature escape', 'snowboard / splitboard trip', 'camping trip (wild camping)', 'hut trek (summer)', 'yoga / wellness retreat'], 'scores': [0.45239609479904175, 0.39182814955711365, 0.03087054006755352, 0.021208807826042175, 0.019435159862041473, 0.01809830032289028, 0.015263390727341175, 0.014824162237346172, 0.01339301560074091, 0.008623503148555756, 0.0034696790389716625, 0.0033059841953217983, 0.0026981434784829617, 0.0023115249350667, 0.0014284384669736028, 0.0008451264584437013]}\n", + "city trip\n", + "0\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['photography', 'running', 'paragliding', 'sightseeing', 'yoga', 'relaxing', 'stand-up paddleboarding (SUP)', 'going to the beach', 'hut-to-hut hiking', 'hiking', 'fishing', 'rock climbing', 'ski touring', 'kayaking / canoeing', 'snorkeling', 'biking', 'horseback riding', 'swimming', 'cross-country skiing', 'ice climbing', 'skiing', 'scuba diving', 'rafting', 'snowshoe hiking', 'surfing'], 'scores': [0.9982200860977173, 0.8451107144355774, 0.8157505989074707, 0.5136172771453857, 0.3555079400539398, 0.10830502957105637, 0.029663724824786186, 0.002340897684916854, 0.0021064123138785362, 0.001811002497561276, 0.001619927235879004, 0.0011951243504881859, 0.0005228804075159132, 0.0003923563053831458, 0.00026167574105784297, 0.00011586806067498401, 6.076138015487231e-05, 4.014953810838051e-05, 3.3960262953769416e-05, 3.057323192479089e-05, 2.75468519248534e-05, 2.5356062906212173e-05, 2.3491949832532555e-05, 1.6574558685533702e-05, 1.540743323857896e-05]}\n", + "['photography', 'running', 'paragliding', 'sightseeing']\n", + "1\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['variable weather / spring / autumn', 'cold destination / winter', 'dry / desert-like', 'rainy climate', 'warm destination / summer', 'tropical / humid'], 'scores': [0.9046850800514221, 0.06181586533784866, 0.01785154454410076, 0.007209230214357376, 0.004330475814640522, 0.0041077327914536]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['minimalist', 'luxury (including evening wear)', 'ultralight', 'lightweight (but comfortable)'], 'scores': [0.9266965389251709, 0.02874235063791275, 0.026161089539527893, 0.01839996874332428]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['casual', 'formal (business trip)', 'conservative'], 'scores': [0.695661723613739, 0.16892163455486298, 0.13541661202907562]}\n", + "casual\n", + "4\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['indoor', 'huts with half board', 'sleeping in a tent', 'sleeping in a car'], 'scores': [0.9643056392669678, 0.034512825310230255, 0.0006053661345504224, 0.0005761855863966048]}\n", + "indoor\n", + "5\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.8479765057563782, 0.15202350914478302]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['travel with children', 'pet-friendly', 'self-supported (bring your own cooking gear)', 'snow and ice', 'no special conditions to consider', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity'], 'scores': [0.5751603245735168, 0.08135509490966797, 0.07521982491016388, 0.06849102675914764, 0.06833382695913315, 0.06071845814585686, 0.0428948774933815, 0.0278265792876482]}\n", + "travel with children\n", + "7\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['7+ days', '7 days', '2 days', '5 days', '3 days', '4 days', '6 days', '1 day'], 'scores': [0.24407239258289337, 0.24201279878616333, 0.15072190761566162, 0.14704979956150055, 0.13021770119667053, 0.049783434718847275, 0.0354502871632576, 0.0006916742422617972]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type city trip \n", + "1 activities [photography, running, paragliding, sightseeing] \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation own vehicle \n", + "7 special_conditions travel with children \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 city trip \n", + "1 [relaxing] \n", + "2 cold destination / winter \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.0 NaN\n", + "0 0.666667 1.0 0.666667\n", + "0 0.444444 0.0 1.000000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['long-distance hike / thru-hike', 'cultural exploration', 'micro-adventure / weekend trip', 'ski tour / skitour', 'camping trip (campground)', 'festival trip', 'digital nomad trip', 'hut trek (summer)', 'camping trip (wild camping)', 'city trip', 'beach vacation', 'nature escape', 'yoga / wellness retreat', 'hut trek (winter)', 'road trip (car/camper)', 'snowboard / splitboard trip'], 'scores': [0.6391688585281372, 0.1992405354976654, 0.09796122461557388, 0.018116997554898262, 0.009553882293403149, 0.009360258467495441, 0.008848845027387142, 0.007181849330663681, 0.004239208064973354, 0.002507743425667286, 0.0009007346234284341, 0.0008697589510120451, 0.0005665600765496492, 0.0005454406491480768, 0.000539708009455353, 0.000398428674088791]}\n", + "long-distance hike / thru-hike\n", + "0\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['sightseeing', 'hiking', 'photography', 'running', 'rafting', 'relaxing', 'yoga', 'stand-up paddleboarding (SUP)', 'snorkeling', 'swimming', 'hut-to-hut hiking', 'rock climbing', 'paragliding', 'horseback riding', 'surfing', 'going to the beach', 'ski touring', 'fishing', 'kayaking / canoeing', 'skiing', 'scuba diving', 'ice climbing', 'biking', 'snowshoe hiking', 'cross-country skiing'], 'scores': [0.9999529719352722, 0.9988834857940674, 0.3719910979270935, 0.31013864278793335, 0.30444297194480896, 0.1280682533979416, 0.046863943338394165, 0.017836086452007294, 0.010855655185878277, 0.006217176094651222, 0.003480800660327077, 0.0017547928728163242, 0.0003136920277029276, 0.00019969380809925497, 0.00019650146714411676, 0.00014437627396546304, 7.375824498012662e-05, 6.8435758294072e-05, 6.381970888469368e-05, 3.951123289880343e-05, 3.331455081934109e-05, 1.7446116544306278e-05, 1.3563214452005923e-05, 1.0083023880724795e-05, 6.3861116359476e-06]}\n", + "['sightseeing', 'hiking']\n", + "1\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['variable weather / spring / autumn', 'warm destination / summer', 'tropical / humid', 'rainy climate', 'cold destination / winter', 'dry / desert-like'], 'scores': [0.37135037779808044, 0.3204072415828705, 0.21922175586223602, 0.03517947718501091, 0.02729681320488453, 0.02654428966343403]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['luxury (including evening wear)', 'lightweight (but comfortable)', 'ultralight', 'minimalist'], 'scores': [0.31400763988494873, 0.3113711178302765, 0.19337615370750427, 0.18124504387378693]}\n", + "luxury (including evening wear)\n", + "3\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.7345985174179077, 0.21783266961574554, 0.04756878688931465]}\n", + "casual\n", + "4\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['huts with half board', 'indoor', 'sleeping in a tent', 'sleeping in a car'], 'scores': [0.45667150616645813, 0.31709080934524536, 0.1675349920988083, 0.05870261788368225]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.9976876974105835, 0.0023123116698116064]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['self-supported (bring your own cooking gear)', 'pet-friendly', 'travel with children', 'no special conditions to consider', 'off-grid / no electricity', 'snow and ice', 'high alpine terrain', 'snow, ice and avalanche-prone terrain'], 'scores': [0.22990663349628448, 0.19825373589992523, 0.19189415872097015, 0.12580519914627075, 0.07754165679216385, 0.07121263444423676, 0.06273777037858963, 0.04264823719859123]}\n", + "self-supported (bring your own cooking gear)\n", + "7\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['7+ days', '7 days', '3 days', '4 days', '6 days', '5 days', '2 days', '1 day'], 'scores': [0.9156420826911926, 0.04964160546660423, 0.015258747152984142, 0.008262275718152523, 0.0057467143051326275, 0.004083935171365738, 0.0007110430742613971, 0.0006536644068546593]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type long-distance hike / thru-hike \n", + "1 activities [sightseeing, hiking] \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort luxury (including evening wear) \n", + "4 dress_code casual \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions self-supported (bring your own cooking gear) \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 cultural exploration \n", + "1 [sightseeing, hiking, rafting] \n", + "2 variable weather / spring / autumn \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 rainy climate \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['micro-adventure / weekend trip', 'hut trek (summer)', 'cultural exploration', 'camping trip (campground)', 'ski tour / skitour', 'camping trip (wild camping)', 'long-distance hike / thru-hike', 'festival trip', 'nature escape', 'digital nomad trip', 'city trip', 'yoga / wellness retreat', 'road trip (car/camper)', 'beach vacation', 'snowboard / splitboard trip', 'hut trek (winter)'], 'scores': [0.399262934923172, 0.11123846471309662, 0.10382843762636185, 0.09988072514533997, 0.04976071044802666, 0.042101696133613586, 0.039874546229839325, 0.029952242970466614, 0.027864206582307816, 0.025919852778315544, 0.024940188974142075, 0.020264005288481712, 0.011593679897487164, 0.01072726957499981, 0.0018079130677506328, 0.0009830890921875834]}\n", + "micro-adventure / weekend trip\n", + "0\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['hiking', 'sightseeing', 'swimming', 'relaxing', 'photography', 'yoga', 'rock climbing', 'running', 'horseback riding', 'paragliding', 'cross-country skiing', 'ice climbing', 'biking', 'hut-to-hut hiking', 'skiing', 'stand-up paddleboarding (SUP)', 'surfing', 'rafting', 'kayaking / canoeing', 'ski touring', 'snorkeling', 'scuba diving', 'fishing', 'snowshoe hiking', 'going to the beach'], 'scores': [0.9999757409095764, 0.9999136328697205, 0.9996724724769592, 0.9950104355812073, 0.9878146648406982, 0.9702362418174744, 0.9684181213378906, 0.9652480483055115, 0.9647860527038574, 0.9470340609550476, 0.9403603672981262, 0.9337814450263977, 0.7944441437721252, 0.7841721773147583, 0.7799363732337952, 0.7348324060440063, 0.4181976914405823, 0.41387978196144104, 0.3358054459095001, 0.2870975732803345, 0.2532541751861572, 0.15205828845500946, 0.08441334962844849, 0.03719170764088631, 0.0015505956253036857]}\n", + "['hiking', 'sightseeing', 'swimming', 'relaxing', 'photography', 'yoga', 'rock climbing', 'running', 'horseback riding', 'paragliding', 'cross-country skiing', 'ice climbing', 'biking', 'hut-to-hut hiking', 'skiing', 'stand-up paddleboarding (SUP)']\n", + "1\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['warm destination / summer', 'variable weather / spring / autumn', 'tropical / humid', 'dry / desert-like', 'rainy climate', 'cold destination / winter'], 'scores': [0.8853303790092468, 0.06323658674955368, 0.0203978531062603, 0.015069224871695042, 0.013677663169801235, 0.002288248622789979]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['lightweight (but comfortable)', 'ultralight', 'luxury (including evening wear)', 'minimalist'], 'scores': [0.28714197874069214, 0.26553791761398315, 0.2564510405063629, 0.19086909294128418]}\n", + "lightweight (but comfortable)\n", + "3\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.950221836566925, 0.03379425033926964, 0.015983905643224716]}\n", + "casual\n", + "4\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['huts with half board', 'sleeping in a tent', 'indoor', 'sleeping in a car'], 'scores': [0.47244933247566223, 0.22768281400203705, 0.17343464493751526, 0.12643319368362427]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.646557092666626, 0.353442907333374]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['self-supported (bring your own cooking gear)', 'off-grid / no electricity', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'pet-friendly', 'travel with children', 'no special conditions to consider', 'snow and ice'], 'scores': [0.24066784977912903, 0.21955342590808868, 0.20271560549736023, 0.13701395690441132, 0.1005372628569603, 0.03759154677391052, 0.031228909268975258, 0.03069145418703556]}\n", + "self-supported (bring your own cooking gear)\n", + "7\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['7+ days', '1 day', '7 days', '2 days', '6 days', '4 days', '3 days', '5 days'], 'scores': [0.925011932849884, 0.0197151992470026, 0.013198123313486576, 0.011958166025578976, 0.008182710967957973, 0.007919016294181347, 0.007132015191018581, 0.006882876623421907]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type micro-adventure / weekend trip \n", + "1 activities [hiking, sightseeing, swimming, relaxing, phot... \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort lightweight (but comfortable) \n", + "4 dress_code casual \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions self-supported (bring your own cooking gear) \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 nature escape \n", + "1 [swimming, relaxing, hiking] \n", + "2 warm destination / summer \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['long-distance hike / thru-hike', 'snowboard / splitboard trip', 'road trip (car/camper)', 'micro-adventure / weekend trip', 'digital nomad trip', 'hut trek (summer)', 'cultural exploration', 'beach vacation', 'nature escape', 'ski tour / skitour', 'camping trip (wild camping)', 'festival trip', 'yoga / wellness retreat', 'hut trek (winter)', 'camping trip (campground)', 'city trip'], 'scores': [0.307785302400589, 0.21902230381965637, 0.2059311717748642, 0.0918341726064682, 0.0317988395690918, 0.022238966077566147, 0.02077283337712288, 0.016396038234233856, 0.016088521108031273, 0.015115255489945412, 0.011458033695816994, 0.011041054502129555, 0.009128374978899956, 0.008595850318670273, 0.00814863946288824, 0.004644663538783789]}\n", + "long-distance hike / thru-hike\n", + "0\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['hiking', 'going to the beach', 'sightseeing', 'hut-to-hut hiking', 'relaxing', 'photography', 'ski touring', 'running', 'stand-up paddleboarding (SUP)', 'snowshoe hiking', 'yoga', 'rock climbing', 'biking', 'rafting', 'cross-country skiing', 'skiing', 'ice climbing', 'surfing', 'horseback riding', 'fishing', 'kayaking / canoeing', 'swimming', 'paragliding', 'snorkeling', 'scuba diving'], 'scores': [0.9999420046806335, 0.9937199950218201, 0.9705187678337097, 0.807087779045105, 0.7726525664329529, 0.7345634698867798, 0.22688233852386475, 0.19742780923843384, 0.10495136678218842, 0.022291118279099464, 0.01619880646467209, 0.005674958229064941, 0.0020213245879858732, 0.0010871101403608918, 0.000742745294701308, 0.00048393983161076903, 0.0002776516485027969, 0.00026415023603476584, 0.00021324043336790055, 0.0002008231676882133, 0.00011857100616907701, 7.436196028720587e-05, 4.881532731815241e-05, 2.4528446374461055e-05, 8.641897693451028e-06]}\n", + "['hiking', 'going to the beach', 'sightseeing', 'hut-to-hut hiking', 'relaxing', 'photography']\n", + "1\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['variable weather / spring / autumn', 'cold destination / winter', 'warm destination / summer', 'rainy climate', 'tropical / humid', 'dry / desert-like'], 'scores': [0.348645955324173, 0.251813679933548, 0.18834973871707916, 0.09632129967212677, 0.07351076602935791, 0.04135853052139282]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['minimalist', 'ultralight', 'lightweight (but comfortable)', 'luxury (including evening wear)'], 'scores': [0.5279046893119812, 0.26949775218963623, 0.18797814846038818, 0.014619375579059124]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.7808143496513367, 0.1755133420228958, 0.043672334402799606]}\n", + "casual\n", + "4\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['huts with half board', 'indoor', 'sleeping in a car', 'sleeping in a tent'], 'scores': [0.5076353549957275, 0.33340293169021606, 0.09201522171497345, 0.06694648414850235]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.9687432050704956, 0.03125680983066559]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['self-supported (bring your own cooking gear)', 'high alpine terrain', 'pet-friendly', 'travel with children', 'snow and ice', 'no special conditions to consider', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity'], 'scores': [0.27305731177330017, 0.18301300704479218, 0.17119400203227997, 0.13855385780334473, 0.07743344455957413, 0.05604451894760132, 0.05048489570617676, 0.05021902546286583]}\n", + "self-supported (bring your own cooking gear)\n", + "7\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['7 days', '6 days', '7+ days', '5 days', '2 days', '3 days', '4 days', '1 day'], 'scores': [0.39104464650154114, 0.2897762060165405, 0.1694536805152893, 0.04283830150961876, 0.03119494393467903, 0.030063502490520477, 0.027407746762037277, 0.018220972269773483]}\n", + "7 days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type long-distance hike / thru-hike \n", + "1 activities [hiking, going to the beach, sightseeing, hut-... \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions self-supported (bring your own cooking gear) \n", + "8 trip_length_days 7 days \n", + "\n", + " true_class \n", + "0 long-distance hike / thru-hike \n", + "1 [going to the beach] \n", + "2 tropical / humid \n", + "3 minimalist \n", + "4 casual \n", + "5 huts with half board \n", + "6 own vehicle \n", + "7 off-grid / no electricity \n", + "8 6 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n", + "0 0.555556 1.000000 0.833333\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['beach vacation', 'road trip (car/camper)', 'camping trip (campground)', 'micro-adventure / weekend trip', 'camping trip (wild camping)', 'festival trip', 'long-distance hike / thru-hike', 'digital nomad trip', 'ski tour / skitour', 'city trip', 'snowboard / splitboard trip', 'nature escape', 'hut trek (summer)', 'hut trek (winter)', 'yoga / wellness retreat', 'cultural exploration'], 'scores': [0.514082670211792, 0.21859246492385864, 0.17132116854190826, 0.07659809291362762, 0.00910242274403572, 0.002291250042617321, 0.0018519052537158132, 0.0013648553285747766, 0.0011585818137973547, 0.00088925426825881, 0.0006727487780153751, 0.0005743220681324601, 0.0004519206704571843, 0.00041462210356257856, 0.0003662202216219157, 0.0002674963616300374]}\n", + "beach vacation\n", + "0\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['going to the beach', 'stand-up paddleboarding (SUP)', 'relaxing', 'sightseeing', 'kayaking / canoeing', 'rafting', 'hiking', 'ski touring', 'paragliding', 'hut-to-hut hiking', 'swimming', 'fishing', 'surfing', 'biking', 'running', 'snorkeling', 'skiing', 'yoga', 'snowshoe hiking', 'ice climbing', 'horseback riding', 'rock climbing', 'scuba diving', 'photography', 'cross-country skiing'], 'scores': [0.9951664805412292, 0.0007465911330655217, 0.00012195681483717635, 5.901218537474051e-05, 4.4055559555999935e-05, 4.248578625265509e-05, 3.655617547337897e-05, 2.936698729172349e-05, 2.435299575154204e-05, 1.663279726926703e-05, 1.5113877452677116e-05, 1.4154848940961529e-05, 1.1902168807864655e-05, 1.1185119547008071e-05, 1.0269744052493479e-05, 7.661022209504154e-06, 6.11952600593213e-06, 5.437631898530526e-06, 4.908260507363593e-06, 4.472567525226623e-06, 3.872326033160789e-06, 3.687909611471696e-06, 3.5238058444519993e-06, 3.260090352341649e-06, 3.105657697233255e-06]}\n", + "['going to the beach']\n", + "1\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['variable weather / spring / autumn', 'cold destination / winter', 'warm destination / summer', 'rainy climate', 'tropical / humid', 'dry / desert-like'], 'scores': [0.46722230315208435, 0.16364941000938416, 0.15415365993976593, 0.08851196616888046, 0.07209648191928864, 0.05436616390943527]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['minimalist', 'lightweight (but comfortable)', 'luxury (including evening wear)', 'ultralight'], 'scores': [0.4169754087924957, 0.26534488797187805, 0.18320927023887634, 0.13447043299674988]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['casual', 'formal (business trip)', 'conservative'], 'scores': [0.8853278160095215, 0.09371301531791687, 0.02095925435423851]}\n", + "casual\n", + "4\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['sleeping in a tent', 'indoor', 'sleeping in a car', 'huts with half board'], 'scores': [0.9975091218948364, 0.0015241053188219666, 0.000863413792103529, 0.0001033771550282836]}\n", + "sleeping in a tent\n", + "5\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['no own vehicle', 'own vehicle'], 'scores': [0.6629492044448853, 0.3370508551597595]}\n", + "no own vehicle\n", + "6\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['travel with children', 'no special conditions to consider', 'self-supported (bring your own cooking gear)', 'snow and ice', 'pet-friendly', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity'], 'scores': [0.30429574847221375, 0.25901490449905396, 0.10586199909448624, 0.07926543056964874, 0.0763142853975296, 0.06895460188388824, 0.06407862156629562, 0.04221438243985176]}\n", + "travel with children\n", + "7\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['7+ days', '7 days', '2 days', '3 days', '4 days', '6 days', '1 day', '5 days'], 'scores': [0.4528488516807556, 0.16225562989711761, 0.11383233964443207, 0.06288284808397293, 0.06238923966884613, 0.05307593196630478, 0.04749447479844093, 0.04522067680954933]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type beach vacation \n", + "1 activities [going to the beach] \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation sleeping in a tent \n", + "6 transportation no own vehicle \n", + "7 special_conditions travel with children \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 beach vacation \n", + "1 [stand-up paddleboarding (SUP), surfing] \n", + "2 cold destination / winter \n", + "3 ultralight \n", + "4 casual \n", + "5 sleeping in a tent \n", + "6 own vehicle \n", + "7 off-grid / no electricity \n", + "8 6 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n", + "0 0.555556 1.000000 0.833333\n", + "0 0.333333 0.000000 1.000000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['yoga / wellness retreat', 'micro-adventure / weekend trip', 'ski tour / skitour', 'cultural exploration', 'city trip', 'nature escape', 'digital nomad trip', 'festival trip', 'long-distance hike / thru-hike', 'camping trip (campground)', 'hut trek (winter)', 'camping trip (wild camping)', 'road trip (car/camper)', 'snowboard / splitboard trip', 'beach vacation', 'hut trek (summer)'], 'scores': [0.764270544052124, 0.14882460236549377, 0.01460289116948843, 0.013516460545361042, 0.01233332883566618, 0.01110365241765976, 0.008976204320788383, 0.008688248693943024, 0.0077370391227304935, 0.0027588019147515297, 0.002010364318266511, 0.0018135884311050177, 0.0010747710475698113, 0.0009247296256944537, 0.0008900162065401673, 0.0004748118226416409]}\n", + "yoga / wellness retreat\n", + "0\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['yoga', 'relaxing', 'sightseeing', 'hiking', 'snowshoe hiking', 'ski touring', 'photography', 'hut-to-hut hiking', 'running', 'going to the beach', 'ice climbing', 'stand-up paddleboarding (SUP)', 'skiing', 'biking', 'cross-country skiing', 'rafting', 'paragliding', 'swimming', 'rock climbing', 'horseback riding', 'snorkeling', 'kayaking / canoeing', 'surfing', 'fishing', 'scuba diving'], 'scores': [0.9673612117767334, 0.851227879524231, 0.8119550943374634, 0.6501596570014954, 0.119605652987957, 0.030798301100730896, 0.0016445431392639875, 0.00024797520018182695, 0.00019679528486449271, 0.00017994307563640177, 0.00014823905075900257, 0.00011313055438222364, 0.00010658867540769279, 2.934567237389274e-05, 2.574020800238941e-05, 2.250136276416015e-05, 2.246206895506475e-05, 1.90786668099463e-05, 1.7564769223099574e-05, 1.5156508197833318e-05, 1.5060699297464453e-05, 1.4467946130025666e-05, 1.2958912520844024e-05, 8.721424819668755e-06, 7.419628673233092e-06]}\n", + "['yoga', 'relaxing', 'sightseeing', 'hiking']\n", + "1\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['variable weather / spring / autumn', 'cold destination / winter', 'dry / desert-like', 'warm destination / summer', 'tropical / humid', 'rainy climate'], 'scores': [0.7285766005516052, 0.256941556930542, 0.0047937845811247826, 0.003848850727081299, 0.0029669953510165215, 0.002872203476727009]}\n", + "variable weather / spring / autumn\n", + "2\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['luxury (including evening wear)', 'lightweight (but comfortable)', 'ultralight', 'minimalist'], 'scores': [0.5102185606956482, 0.21124626696109772, 0.143381267786026, 0.1351538896560669]}\n", + "luxury (including evening wear)\n", + "3\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.8451984524726868, 0.13289128243923187, 0.021910231560468674]}\n", + "casual\n", + "4\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['indoor', 'huts with half board', 'sleeping in a tent', 'sleeping in a car'], 'scores': [0.9983111023902893, 0.0010714009404182434, 0.00041075368062593043, 0.0002067020977847278]}\n", + "indoor\n", + "5\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['no own vehicle', 'own vehicle'], 'scores': [0.9871621131896973, 0.012837963178753853]}\n", + "no own vehicle\n", + "6\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['snow and ice', 'self-supported (bring your own cooking gear)', 'pet-friendly', 'travel with children', 'no special conditions to consider', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity'], 'scores': [0.43503761291503906, 0.2160661667585373, 0.11101733148097992, 0.09975709766149521, 0.04071706160902977, 0.035351455211639404, 0.034011270850896835, 0.028042016550898552]}\n", + "snow and ice\n", + "7\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['7+ days', '7 days', '5 days', '6 days', '1 day', '4 days', '3 days', '2 days'], 'scores': [0.9084722995758057, 0.027727678418159485, 0.013248518109321594, 0.012942418456077576, 0.012128633446991444, 0.011794760823249817, 0.007681164424866438, 0.006004549562931061]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type yoga / wellness retreat \n", + "1 activities [yoga, relaxing, sightseeing, hiking] \n", + "2 climate_or_season variable weather / spring / autumn \n", + "3 style_or_comfort luxury (including evening wear) \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation no own vehicle \n", + "7 special_conditions snow and ice \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 yoga / wellness retreat \n", + "1 [hut-to-hut hiking, yoga] \n", + "2 cold destination / winter \n", + "3 lightweight (but comfortable) \n", + "4 formal (business trip) \n", + "5 sleeping in a tent \n", + "6 no own vehicle \n", + "7 avalanche-prone terrain \n", + "8 7 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n", + "0 0.555556 1.000000 0.833333\n", + "0 0.333333 0.000000 1.000000\n", + "0 0.222222 0.500000 0.750000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['ski tour / skitour', 'micro-adventure / weekend trip', 'cultural exploration', 'digital nomad trip', 'nature escape', 'city trip', 'festival trip', 'long-distance hike / thru-hike', 'hut trek (winter)', 'camping trip (campground)', 'snowboard / splitboard trip', 'camping trip (wild camping)', 'yoga / wellness retreat', 'beach vacation', 'hut trek (summer)', 'road trip (car/camper)'], 'scores': [0.7912495136260986, 0.18457308411598206, 0.006496830843389034, 0.005906335078179836, 0.0022365122567862272, 0.0019783126190304756, 0.001958322012796998, 0.0015622376231476665, 0.0010011475533246994, 0.0008931723423302174, 0.0008437229553237557, 0.0006696251803077757, 0.0003258714859839529, 0.0001465948298573494, 8.767224062466994e-05, 7.109773287083954e-05]}\n", + "ski tour / skitour\n", + "0\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['ski touring', 'skiing', 'sightseeing', 'photography', 'relaxing', 'cross-country skiing', 'snowshoe hiking', 'running', 'ice climbing', 'yoga', 'hiking', 'hut-to-hut hiking', 'going to the beach', 'paragliding', 'rafting', 'rock climbing', 'biking', 'fishing', 'horseback riding', 'surfing', 'swimming', 'kayaking / canoeing', 'stand-up paddleboarding (SUP)', 'snorkeling', 'scuba diving'], 'scores': [0.9999654293060303, 0.9944596886634827, 0.9757429957389832, 0.7401605844497681, 0.531012237071991, 0.43034660816192627, 0.05276774987578392, 0.023154079914093018, 0.014407726936042309, 0.005799490958452225, 0.0014456392964348197, 0.00032733430271036923, 0.00017197725537698716, 0.00013273980584926903, 6.611074786633253e-05, 6.148772808955982e-05, 2.5040852051461115e-05, 1.2513893125287723e-05, 1.1538132639543619e-05, 1.1156663276779e-05, 9.319897799286991e-06, 6.415570624085376e-06, 4.8607284952595364e-06, 4.313362751418026e-06, 2.94029791803041e-06]}\n", + "['ski touring', 'skiing', 'sightseeing', 'photography', 'relaxing']\n", + "1\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['cold destination / winter', 'variable weather / spring / autumn', 'rainy climate', 'warm destination / summer', 'tropical / humid', 'dry / desert-like'], 'scores': [0.995788037776947, 0.003548521315678954, 0.00025412594550289214, 0.00015224718663375825, 0.00014055441715754569, 0.00011639297736110166]}\n", + "cold destination / winter\n", + "2\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['minimalist', 'lightweight (but comfortable)', 'ultralight', 'luxury (including evening wear)'], 'scores': [0.687770664691925, 0.16885720193386078, 0.13132035732269287, 0.012051742523908615]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.5839866399765015, 0.29318928718566895, 0.12282407283782959]}\n", + "casual\n", + "4\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['indoor', 'huts with half board', 'sleeping in a tent', 'sleeping in a car'], 'scores': [0.9995657801628113, 0.0003081962640862912, 0.00010346570343244821, 2.251639853056986e-05]}\n", + "indoor\n", + "5\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['no own vehicle', 'own vehicle'], 'scores': [0.5097633004188538, 0.49023669958114624]}\n", + "no own vehicle\n", + "6\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['snow and ice', 'travel with children', 'snow, ice and avalanche-prone terrain', 'high alpine terrain', 'off-grid / no electricity', 'no special conditions to consider', 'self-supported (bring your own cooking gear)', 'pet-friendly'], 'scores': [0.8326128721237183, 0.058215875178575516, 0.03803802654147148, 0.037274911999702454, 0.019825320690870285, 0.006256969179958105, 0.003933396656066179, 0.0038426516111940145]}\n", + "snow and ice\n", + "7\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['7+ days', '7 days', '5 days', '6 days', '2 days', '3 days', '4 days', '1 day'], 'scores': [0.8862869739532471, 0.023272352293133736, 0.018582874909043312, 0.017153384163975716, 0.015721378847956657, 0.014918344095349312, 0.013972579501569271, 0.010092118754982948]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type ski tour / skitour \n", + "1 activities [ski touring, skiing, sightseeing, photography... \n", + "2 climate_or_season cold destination / winter \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation no own vehicle \n", + "7 special_conditions snow and ice \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 ski tour / skitour \n", + "1 [ski touring, photography, swimming] \n", + "2 cold destination / winter \n", + "3 minimalist \n", + "4 conservative \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 avalanche-prone terrain \n", + "8 5 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n", + "0 0.555556 1.000000 0.833333\n", + "0 0.333333 0.000000 1.000000\n", + "0 0.222222 0.500000 0.750000\n", + "0 0.555556 0.666667 0.600000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['camping trip (wild camping)', 'camping trip (campground)', 'road trip (car/camper)', 'micro-adventure / weekend trip', 'beach vacation', 'cultural exploration', 'digital nomad trip', 'festival trip', 'nature escape', 'hut trek (summer)', 'ski tour / skitour', 'city trip', 'yoga / wellness retreat', 'long-distance hike / thru-hike', 'hut trek (winter)', 'snowboard / splitboard trip'], 'scores': [0.4519400894641876, 0.28106340765953064, 0.13299500942230225, 0.119535893201828, 0.006582783069461584, 0.0017220464069396257, 0.001517383847385645, 0.0014019669033586979, 0.001203698804602027, 0.0011794682359322906, 0.0002996847906615585, 0.00015913322567939758, 0.00015873221855144948, 0.00010613033373374492, 7.342447497649118e-05, 6.111798575147986e-05]}\n", + "camping trip (wild camping)\n", + "0\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['kayaking / canoeing', 'relaxing', 'swimming', 'snorkeling', 'going to the beach', 'sightseeing', 'rafting', 'running', 'hut-to-hut hiking', 'hiking', 'biking', 'photography', 'scuba diving', 'fishing', 'stand-up paddleboarding (SUP)', 'ski touring', 'surfing', 'paragliding', 'horseback riding', 'skiing', 'yoga', 'cross-country skiing', 'rock climbing', 'snowshoe hiking', 'ice climbing'], 'scores': [0.9992640614509583, 0.9951056241989136, 0.952499508857727, 0.745958149433136, 0.31057634949684143, 0.007450661156326532, 0.001950735691934824, 0.0017637719865888357, 0.00034216392668895423, 0.0001901666691992432, 0.00014842729433439672, 7.320140139199793e-05, 4.365198401501402e-05, 2.900436447816901e-05, 2.0703428162960336e-05, 1.2638719454116654e-05, 1.2075782251486089e-05, 1.2074711776222102e-05, 1.0869985089811962e-05, 8.656240424897987e-06, 7.343625838984735e-06, 5.0360499699309e-06, 3.929691501980415e-06, 3.7386994335975032e-06, 3.6782789720746223e-06]}\n", + "['kayaking / canoeing', 'relaxing', 'swimming', 'snorkeling']\n", + "1\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['tropical / humid', 'warm destination / summer', 'variable weather / spring / autumn', 'rainy climate', 'cold destination / winter', 'dry / desert-like'], 'scores': [0.8114831447601318, 0.1454213559627533, 0.04021230712532997, 0.0011621474986895919, 0.0009152473649010062, 0.0008057011291384697]}\n", + "tropical / humid\n", + "2\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['minimalist', 'lightweight (but comfortable)', 'ultralight', 'luxury (including evening wear)'], 'scores': [0.9056079387664795, 0.0562594048678875, 0.03654729574918747, 0.0015853168442845345]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.9951170682907104, 0.003952663391828537, 0.0009303003898821771]}\n", + "casual\n", + "4\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['sleeping in a car', 'sleeping in a tent', 'huts with half board', 'indoor'], 'scores': [0.46298423409461975, 0.28609219193458557, 0.13673897087574005, 0.11418462544679642]}\n", + "sleeping in a car\n", + "5\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.9969540238380432, 0.003045988967642188]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['off-grid / no electricity', 'travel with children', 'self-supported (bring your own cooking gear)', 'no special conditions to consider', 'pet-friendly', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'snow and ice'], 'scores': [0.8579566478729248, 0.04456052556633949, 0.036918289959430695, 0.033982858061790466, 0.015213035978376865, 0.0060641285963356495, 0.002715851878747344, 0.00258863833732903]}\n", + "off-grid / no electricity\n", + "7\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['3 days', '4 days', '2 days', '7+ days', '5 days', '6 days', '7 days', '1 day'], 'scores': [0.9772002100944519, 0.00542174419388175, 0.004143798258155584, 0.004068906418979168, 0.0026373467408120632, 0.002349153393879533, 0.002291932003572583, 0.001886898186057806]}\n", + "3 days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type camping trip (wild camping) \n", + "1 activities [kayaking / canoeing, relaxing, swimming, snor... \n", + "2 climate_or_season tropical / humid \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation sleeping in a car \n", + "6 transportation own vehicle \n", + "7 special_conditions off-grid / no electricity \n", + "8 trip_length_days 3 days \n", + "\n", + " true_class \n", + "0 camping trip (wild camping) \n", + "1 [scuba diving, kayaking / canoeing] \n", + "2 tropical / humid \n", + "3 lightweight (but comfortable) \n", + "4 conservative \n", + "5 sleeping in a tent \n", + "6 own vehicle \n", + "7 no special conditions to consider \n", + "8 3 days \n", + " accuracy true_ident false_pred\n", + "0 0.444444 0.000000 NaN\n", + "0 0.666667 1.000000 0.666667\n", + "0 0.444444 0.000000 1.000000\n", + "0 0.333333 0.666667 0.000000\n", + "0 0.444444 1.000000 0.812500\n", + "0 0.555556 1.000000 0.833333\n", + "0 0.333333 0.000000 1.000000\n", + "0 0.222222 0.500000 0.750000\n", + "0 0.555556 0.666667 0.600000\n", + "0 0.444444 0.500000 0.750000\n", + " superclass same_value same_value same_value same_value \\\n", + "0 activity_type False True True False \n", + "1 activities False False False False \n", + "2 climate_or_season False False False True \n", + "3 style_or_comfort False True False False \n", + "4 dress_code True True True True \n", + "5 accommodation True True True False \n", + "6 transportation True True False False \n", + "7 special_conditions False False False False \n", + "8 trip_length_days True True True True \n", + "\n", + " same_value same_value same_value same_value same_value same_value \n", + "0 False True True True True True \n", + "1 False False False False False False \n", + "2 True False False False True True \n", + "3 True True False False True False \n", + "4 True True True False False False \n", + "5 False True True False True False \n", + "6 False True False True True True \n", + "7 False False False False False False \n", + "8 True False False False False True \n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.0\n", + "2 climate_or_season 0.4\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.6\n", + "6 transportation 0.6\n", + "7 special_conditions 0.0\n", + "8 trip_length_days 0.6\n", + "accuracy 0.444444\n", + "true_ident 0.533333\n", + "false_pred 0.712500\n", + "dtype: float64\n", + "\n", + "Using model: joeddav/bart-large-mnli-yahoo-answers\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['cultural exploration', 'micro-adventure / weekend trip', 'beach vacation', 'city trip', 'road trip (car/camper)', 'long-distance hike / thru-hike', 'festival trip', 'nature escape', 'digital nomad trip', 'ski tour / skitour', 'hut trek (summer)', 'camping trip (campground)', 'camping trip (wild camping)', 'hut trek (winter)', 'snowboard / splitboard trip', 'yoga / wellness retreat'], 'scores': [0.16716161370277405, 0.12716785073280334, 0.1101449728012085, 0.08154628425836563, 0.06655469536781311, 0.05304424837231636, 0.04946322366595268, 0.0479649193584919, 0.04717966169118881, 0.04617271572351456, 0.039695873856544495, 0.03630887717008591, 0.03551309555768967, 0.03350067511200905, 0.02996276691555977, 0.028618555516004562]}\n", + "cultural exploration\n", + "0\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['sightseeing', 'relaxing', 'going to the beach', 'hiking', 'kayaking / canoeing', 'rafting', 'ski touring', 'hut-to-hut hiking', 'photography', 'biking', 'skiing', 'scuba diving', 'snorkeling', 'fishing', 'surfing', 'horseback riding', 'swimming', 'rock climbing', 'paragliding', 'ice climbing', 'cross-country skiing', 'running', 'snowshoe hiking', 'stand-up paddleboarding (SUP)', 'yoga'], 'scores': [0.8850327730178833, 0.7176618576049805, 0.6749467253684998, 0.42652514576911926, 0.32720306515693665, 0.25558674335479736, 0.2530333697795868, 0.24432694911956787, 0.23511365056037903, 0.22848117351531982, 0.182534322142601, 0.17652571201324463, 0.17509806156158447, 0.1716732233762741, 0.1655716449022293, 0.16310735046863556, 0.15896931290626526, 0.1521538496017456, 0.14194028079509735, 0.1316554993391037, 0.12896256148815155, 0.12777365744113922, 0.12260609865188599, 0.1141638234257698, 0.09925767034292221]}\n", + "['sightseeing', 'relaxing', 'going to the beach']\n", + "1\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['warm destination / summer', 'tropical / humid', 'variable weather / spring / autumn', 'cold destination / winter', 'dry / desert-like', 'rainy climate'], 'scores': [0.266559362411499, 0.17630772292613983, 0.16403718292713165, 0.15154631435871124, 0.13040785491466522, 0.11114154011011124]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['minimalist', 'ultralight', 'luxury (including evening wear)', 'lightweight (but comfortable)'], 'scores': [0.38021835684776306, 0.23342055082321167, 0.22524654865264893, 0.16111454367637634]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['conservative', 'casual', 'formal (business trip)'], 'scores': [0.44398602843284607, 0.2991285026073456, 0.25688546895980835]}\n", + "conservative\n", + "4\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['huts with half board', 'indoor', 'sleeping in a car', 'sleeping in a tent'], 'scores': [0.3143824338912964, 0.24525196850299835, 0.22517447173595428, 0.21519118547439575]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5519587993621826, 0.4480411410331726]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['no special conditions to consider', 'travel with children', 'high alpine terrain', 'self-supported (bring your own cooking gear)', 'off-grid / no electricity', 'snow and ice', 'pet-friendly', 'snow, ice and avalanche-prone terrain'], 'scores': [0.20332522690296173, 0.13691647350788116, 0.12470469623804092, 0.12075766921043396, 0.11970027536153793, 0.10545651614665985, 0.09536156803369522, 0.09377763420343399]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'I am planning a trip to Greece with my boyfriend, where we will visit two islands. We have booked an apartment on each island for a few days and plan to spend most of our time relaxing. Our main goals are to enjoy the beach, try delicious local food, and possibly go on a hike—if it’s not too hot. We will be relying solely on public transport. We’re in our late 20s and traveling from the Netherlands.', 'labels': ['7+ days', '6 days', '7 days', '4 days', '5 days', '2 days', '3 days', '1 day'], 'scores': [0.18392924964427948, 0.1266929656267166, 0.12513120472431183, 0.1190633624792099, 0.11783891916275024, 0.11224181950092316, 0.11214782297611237, 0.10295464098453522]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type cultural exploration \n", + "1 activities [sightseeing, relaxing, going to the beach] \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort minimalist \n", + "4 dress_code conservative \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 beach vacation \n", + "1 [swimming, going to the beach, relaxing, hiking] \n", + "2 warm destination / summer \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.5 0.333333\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['city trip', 'cultural exploration', 'micro-adventure / weekend trip', 'road trip (car/camper)', 'festival trip', 'ski tour / skitour', 'long-distance hike / thru-hike', 'digital nomad trip', 'nature escape', 'hut trek (summer)', 'beach vacation', 'snowboard / splitboard trip', 'hut trek (winter)', 'camping trip (campground)', 'camping trip (wild camping)', 'yoga / wellness retreat'], 'scores': [0.25980284810066223, 0.16085410118103027, 0.11896767467260361, 0.05226515233516693, 0.050702739506959915, 0.046058136969804764, 0.0418943352997303, 0.04128628969192505, 0.031528014689683914, 0.030673017725348473, 0.029140915721654892, 0.02851775847375393, 0.028151461854577065, 0.02802700735628605, 0.027383984997868538, 0.024746567010879517]}\n", + "city trip\n", + "0\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['sightseeing', 'relaxing', 'photography', 'ski touring', 'kayaking / canoeing', 'horseback riding', 'biking', 'running', 'hut-to-hut hiking', 'skiing', 'hiking', 'rafting', 'snowshoe hiking', 'cross-country skiing', 'going to the beach', 'paragliding', 'ice climbing', 'stand-up paddleboarding (SUP)', 'rock climbing', 'yoga', 'fishing', 'scuba diving', 'snorkeling', 'surfing', 'swimming'], 'scores': [0.8883329033851624, 0.3308798372745514, 0.27078673243522644, 0.2502721846103668, 0.18221960961818695, 0.17400631308555603, 0.1706402450799942, 0.16008920967578888, 0.15355552732944489, 0.15223640203475952, 0.14949491620063782, 0.14705154299736023, 0.12970532476902008, 0.12721051275730133, 0.12559349834918976, 0.11049619317054749, 0.10980241000652313, 0.10505887120962143, 0.09921692311763763, 0.09889169037342072, 0.09842774271965027, 0.08242142200469971, 0.07435522973537445, 0.06917035579681396, 0.05980757251381874]}\n", + "['sightseeing']\n", + "1\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['warm destination / summer', 'variable weather / spring / autumn', 'cold destination / winter', 'dry / desert-like', 'tropical / humid', 'rainy climate'], 'scores': [0.20907093584537506, 0.19385375082492828, 0.18452785909175873, 0.14411833882331848, 0.13630695641040802, 0.13212208449840546]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['minimalist', 'ultralight', 'luxury (including evening wear)', 'lightweight (but comfortable)'], 'scores': [0.33152344822883606, 0.2675602436065674, 0.21385043859481812, 0.18706588447093964]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['conservative', 'casual', 'formal (business trip)'], 'scores': [0.4617535471916199, 0.2691788673400879, 0.26906755566596985]}\n", + "conservative\n", + "4\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['huts with half board', 'indoor', 'sleeping in a car', 'sleeping in a tent'], 'scores': [0.3076592981815338, 0.2513667345046997, 0.22900241613388062, 0.21197155117988586]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5231750011444092, 0.4768249988555908]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['no special conditions to consider', 'travel with children', 'self-supported (bring your own cooking gear)', 'high alpine terrain', 'off-grid / no electricity', 'snow and ice', 'snow, ice and avalanche-prone terrain', 'pet-friendly'], 'scores': [0.18486706912517548, 0.13879624009132385, 0.12936383485794067, 0.1200103908777237, 0.11849591881036758, 0.10969463735818863, 0.1023821234703064, 0.0963897556066513]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'We are a couple in our thirties traveling to Vienna for a three-day city trip. We’ll be staying at a friend’s house and plan to explore the city by sightseeing, strolling through the streets, visiting markets, and trying out great restaurants and cafés. We also hope to attend a classical music concert. Our journey to Vienna will be by train.', 'labels': ['3 days', '7+ days', '4 days', '7 days', '5 days', '6 days', '2 days', '1 day'], 'scores': [0.26189228892326355, 0.12783558666706085, 0.12143480032682419, 0.10889916121959686, 0.1056910902261734, 0.1056862473487854, 0.0874469056725502, 0.08111389726400375]}\n", + "3 days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type city trip \n", + "1 activities [sightseeing] \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort minimalist \n", + "4 dress_code conservative \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 3 days \n", + "\n", + " true_class \n", + "0 city trip \n", + "1 [sightseeing] \n", + "2 variable weather / spring / autumn \n", + "3 luxury (including evening wear) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 3 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.5 0.333333\n", + "0 0.333333 1.0 0.000000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['festival trip', 'cultural exploration', 'city trip', 'micro-adventure / weekend trip', 'hut trek (winter)', 'road trip (car/camper)', 'ski tour / skitour', 'digital nomad trip', 'hut trek (summer)', 'beach vacation', 'long-distance hike / thru-hike', 'snowboard / splitboard trip', 'camping trip (campground)', 'nature escape', 'camping trip (wild camping)', 'yoga / wellness retreat'], 'scores': [0.293078750371933, 0.16062624752521515, 0.06345170736312866, 0.06158151477575302, 0.056430768221616745, 0.04617263004183769, 0.040666013956069946, 0.03946645185351372, 0.03829963505268097, 0.03487568348646164, 0.03402161970734596, 0.02967722713947296, 0.02956923469901085, 0.027611277997493744, 0.025715729221701622, 0.01875552535057068]}\n", + "festival trip\n", + "0\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['sightseeing', 'running', 'relaxing', 'photography', 'hut-to-hut hiking', 'ski touring', 'going to the beach', 'snowshoe hiking', 'rafting', 'skiing', 'horseback riding', 'hiking', 'biking', 'cross-country skiing', 'kayaking / canoeing', 'ice climbing', 'rock climbing', 'stand-up paddleboarding (SUP)', 'paragliding', 'fishing', 'scuba diving', 'snorkeling', 'surfing', 'yoga', 'swimming'], 'scores': [0.2844759225845337, 0.14781935513019562, 0.1255393922328949, 0.061169520020484924, 0.059364836663007736, 0.05813053250312805, 0.055929142981767654, 0.05124993249773979, 0.04971772059798241, 0.04930657893419266, 0.04415588453412056, 0.039289798587560654, 0.03719090297818184, 0.036852315068244934, 0.03645915165543556, 0.032679203897714615, 0.031043078750371933, 0.02770671620965004, 0.026979653164744377, 0.024992449209094048, 0.020528962835669518, 0.017404912039637566, 0.013790704309940338, 0.012935450300574303, 0.01148306392133236]}\n", + "[]\n", + "1\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['cold destination / winter', 'warm destination / summer', 'variable weather / spring / autumn', 'tropical / humid', 'dry / desert-like', 'rainy climate'], 'scores': [0.3128221333026886, 0.21224693953990936, 0.14469023048877716, 0.12454197555780411, 0.10379233956336975, 0.10190633684396744]}\n", + "cold destination / winter\n", + "2\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['minimalist', 'luxury (including evening wear)', 'lightweight (but comfortable)', 'ultralight'], 'scores': [0.3766309320926666, 0.21288399398326874, 0.2106471210718155, 0.19983801245689392]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['conservative', 'casual', 'formal (business trip)'], 'scores': [0.4758940637111664, 0.35429829359054565, 0.16980759799480438]}\n", + "conservative\n", + "4\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['huts with half board', 'sleeping in a tent', 'indoor', 'sleeping in a car'], 'scores': [0.3428862690925598, 0.22737044095993042, 0.22447851300239563, 0.20526479184627533]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5038818717002869, 0.49611806869506836]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['no special conditions to consider', 'travel with children', 'snow and ice', 'self-supported (bring your own cooking gear)', 'off-grid / no electricity', 'high alpine terrain', 'snow, ice and avalanche-prone terrain', 'pet-friendly'], 'scores': [0.23147523403167725, 0.18651336431503296, 0.11385881155729294, 0.10224857926368713, 0.10020803660154343, 0.09738393872976303, 0.08595966547727585, 0.08235230296850204]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany.', 'labels': ['7+ days', '2 days', '6 days', '7 days', '4 days', '1 day', '5 days', '3 days'], 'scores': [0.1346655935049057, 0.13231344521045685, 0.12829753756523132, 0.12639833986759186, 0.12144803255796432, 0.12076283246278763, 0.11963488906621933, 0.11647934466600418]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type festival trip \n", + "1 activities [] \n", + "2 climate_or_season cold destination / winter \n", + "3 style_or_comfort minimalist \n", + "4 dress_code conservative \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 city trip \n", + "1 [relaxing] \n", + "2 cold destination / winter \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.5 0.333333\n", + "0 0.333333 1.0 0.000000\n", + "0 0.333333 0.0 NaN\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['cultural exploration', 'micro-adventure / weekend trip', 'city trip', 'long-distance hike / thru-hike', 'road trip (car/camper)', 'festival trip', 'beach vacation', 'nature escape', 'digital nomad trip', 'ski tour / skitour', 'hut trek (summer)', 'camping trip (wild camping)', 'camping trip (campground)', 'hut trek (winter)', 'snowboard / splitboard trip', 'yoga / wellness retreat'], 'scores': [0.2301025688648224, 0.09925426542758942, 0.08985505998134613, 0.06585080176591873, 0.05669157952070236, 0.05446624383330345, 0.04960283637046814, 0.04747692868113518, 0.04661855101585388, 0.04570435360074043, 0.04439116269350052, 0.03897939622402191, 0.03885677829384804, 0.03418416902422905, 0.03050987981259823, 0.027455391362309456]}\n", + "cultural exploration\n", + "0\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['sightseeing', 'hiking', 'rafting', 'kayaking / canoeing', 'hut-to-hut hiking', 'photography', 'ski touring', 'relaxing', 'going to the beach', 'rock climbing', 'horseback riding', 'snowshoe hiking', 'biking', 'fishing', 'skiing', 'ice climbing', 'cross-country skiing', 'scuba diving', 'running', 'snorkeling', 'paragliding', 'stand-up paddleboarding (SUP)', 'surfing', 'yoga', 'swimming'], 'scores': [0.9237843751907349, 0.5807417035102844, 0.36438122391700745, 0.35156574845314026, 0.31867438554763794, 0.31593140959739685, 0.251972496509552, 0.23514169454574585, 0.2322484701871872, 0.1928747147321701, 0.19096393883228302, 0.19053521752357483, 0.17830251157283783, 0.1695105880498886, 0.1686009168624878, 0.16153772175312042, 0.1443871408700943, 0.1430586725473404, 0.13869552314281464, 0.13344153761863708, 0.13196821510791779, 0.11570252478122711, 0.11023450642824173, 0.10557413846254349, 0.06943294405937195]}\n", + "['sightseeing', 'hiking']\n", + "1\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['warm destination / summer', 'tropical / humid', 'variable weather / spring / autumn', 'dry / desert-like', 'rainy climate', 'cold destination / winter'], 'scores': [0.2094230055809021, 0.1916349083185196, 0.16284117102622986, 0.15685588121414185, 0.14797377586364746, 0.13127130270004272]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['minimalist', 'ultralight', 'luxury (including evening wear)', 'lightweight (but comfortable)'], 'scores': [0.31595101952552795, 0.24356427788734436, 0.23434904217720032, 0.20613564550876617]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['conservative', 'formal (business trip)', 'casual'], 'scores': [0.37413230538368225, 0.325387179851532, 0.30048051476478577]}\n", + "conservative\n", + "4\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['huts with half board', 'sleeping in a tent', 'sleeping in a car', 'indoor'], 'scores': [0.3308664560317993, 0.24956747889518738, 0.21383841335773468, 0.20572762191295624]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5778870582580566, 0.42211291193962097]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['no special conditions to consider', 'high alpine terrain', 'travel with children', 'self-supported (bring your own cooking gear)', 'snow and ice', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity', 'pet-friendly'], 'scores': [0.16755643486976624, 0.16390444338321686, 0.1370989829301834, 0.12557697296142578, 0.12270595878362656, 0.11366964131593704, 0.0997702106833458, 0.06971736252307892]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'I’m in my twenties and will be traveling to Peru for three weeks. I’m going solo but will meet up with a friend to explore the Sacred Valley and take part in a Machu Picchu tour. We plan to hike, go rafting, and explore the remnants of the ancient Inca Empire. We’re also excited to try Peruvian cuisine and immerse ourselves in the local culture. Depending on our plans, we might also visit the rainforest region, such as Tarapoto. I’ll be flying to Peru on a long-haul flight and will be traveling in August.', 'labels': ['7+ days', '3 days', '7 days', '6 days', '5 days', '4 days', '2 days', '1 day'], 'scores': [0.21186265349388123, 0.1408892422914505, 0.1314566731452942, 0.1299559772014618, 0.11523696780204773, 0.1068982481956482, 0.08361256867647171, 0.08008760213851929]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type cultural exploration \n", + "1 activities [sightseeing, hiking] \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort minimalist \n", + "4 dress_code conservative \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 cultural exploration \n", + "1 [sightseeing, hiking, rafting] \n", + "2 variable weather / spring / autumn \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 rainy climate \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['micro-adventure / weekend trip', 'nature escape', 'cultural exploration', 'long-distance hike / thru-hike', 'hut trek (summer)', 'road trip (car/camper)', 'ski tour / skitour', 'beach vacation', 'camping trip (wild camping)', 'yoga / wellness retreat', 'camping trip (campground)', 'city trip', 'festival trip', 'digital nomad trip', 'snowboard / splitboard trip', 'hut trek (winter)'], 'scores': [0.1256595253944397, 0.11564762890338898, 0.0818299949169159, 0.0732298418879509, 0.06507544964551926, 0.06311747431755066, 0.06167558953166008, 0.05981043726205826, 0.05292873829603195, 0.052205272018909454, 0.0516391284763813, 0.05140812322497368, 0.04123023897409439, 0.03586934134364128, 0.03446359559893608, 0.03420962020754814]}\n", + "micro-adventure / weekend trip\n", + "0\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['sightseeing', 'relaxing', 'hiking', 'going to the beach', 'ski touring', 'kayaking / canoeing', 'swimming', 'snowshoe hiking', 'biking', 'skiing', 'hut-to-hut hiking', 'rafting', 'horseback riding', 'cross-country skiing', 'rock climbing', 'fishing', 'photography', 'snorkeling', 'ice climbing', 'scuba diving', 'running', 'paragliding', 'yoga', 'stand-up paddleboarding (SUP)', 'surfing'], 'scores': [0.9057115316390991, 0.8961816430091858, 0.8563272953033447, 0.560343325138092, 0.5547003149986267, 0.5404509902000427, 0.4798630177974701, 0.44734299182891846, 0.4323567748069763, 0.42824774980545044, 0.4198780655860901, 0.4178984761238098, 0.39238718152046204, 0.3922390639781952, 0.3457918167114258, 0.32880064845085144, 0.28747114539146423, 0.2871841490268707, 0.2843594551086426, 0.2745117247104645, 0.25936663150787354, 0.255580872297287, 0.25076478719711304, 0.2368549406528473, 0.21448370814323425]}\n", + "['sightseeing', 'relaxing', 'hiking', 'going to the beach', 'ski touring', 'kayaking / canoeing']\n", + "1\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['warm destination / summer', 'variable weather / spring / autumn', 'cold destination / winter', 'tropical / humid', 'rainy climate', 'dry / desert-like'], 'scores': [0.5326037406921387, 0.1439884454011917, 0.09808021783828735, 0.08567545562982559, 0.07123921066522598, 0.06841281056404114]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['luxury (including evening wear)', 'minimalist', 'ultralight', 'lightweight (but comfortable)'], 'scores': [0.2719852030277252, 0.25683045387268066, 0.2543821632862091, 0.2168021947145462]}\n", + "luxury (including evening wear)\n", + "3\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['conservative', 'casual', 'formal (business trip)'], 'scores': [0.367921382188797, 0.3297698199748993, 0.3023088574409485]}\n", + "conservative\n", + "4\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['huts with half board', 'sleeping in a tent', 'indoor', 'sleeping in a car'], 'scores': [0.2885679304599762, 0.2731105387210846, 0.22541317343711853, 0.21290835738182068]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5603166222572327, 0.43968331813812256]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['high alpine terrain', 'no special conditions to consider', 'snow and ice', 'travel with children', 'snow, ice and avalanche-prone terrain', 'pet-friendly', 'off-grid / no electricity', 'self-supported (bring your own cooking gear)'], 'scores': [0.17922939360141754, 0.14795276522636414, 0.14044788479804993, 0.1273242086172104, 0.12166408449411392, 0.10294044762849808, 0.09357009083032608, 0.08687112480401993]}\n", + "high alpine terrain\n", + "7\n", + "{'sequence': 'We’re planning a 10-day trip to Austria in the summer, combining hiking with relaxation by the lake. We love exploring scenic trails and enjoying the outdoors, but we also want to unwind and swim in the lake. It’s the perfect mix of adventure and relaxation.', 'labels': ['7+ days', '7 days', '6 days', '5 days', '1 day', '4 days', '2 days', '3 days'], 'scores': [0.43496060371398926, 0.09060744941234589, 0.08739206194877625, 0.0825117751955986, 0.08092711120843887, 0.07746576517820358, 0.07315219938755035, 0.07298304885625839]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type micro-adventure / weekend trip \n", + "1 activities [sightseeing, relaxing, hiking, going to the b... \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort luxury (including evening wear) \n", + "4 dress_code conservative \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions high alpine terrain \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 nature escape \n", + "1 [swimming, relaxing, hiking] \n", + "2 warm destination / summer \n", + "3 lightweight (but comfortable) \n", + "4 casual \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 no special conditions to consider \n", + "8 7+ days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['long-distance hike / thru-hike', 'micro-adventure / weekend trip', 'nature escape', 'camping trip (wild camping)', 'road trip (car/camper)', 'cultural exploration', 'beach vacation', 'ski tour / skitour', 'camping trip (campground)', 'snowboard / splitboard trip', 'hut trek (summer)', 'city trip', 'hut trek (winter)', 'digital nomad trip', 'festival trip', 'yoga / wellness retreat'], 'scores': [0.20863620936870575, 0.09685744345188141, 0.07517095655202866, 0.07343076914548874, 0.0706576257944107, 0.06391564011573792, 0.06255688518285751, 0.053629063069820404, 0.050872139632701874, 0.04593609273433685, 0.03691982477903366, 0.03505941480398178, 0.03402595594525337, 0.032621342688798904, 0.030087171122431755, 0.029623446986079216]}\n", + "long-distance hike / thru-hike\n", + "0\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['hiking', 'sightseeing', 'hut-to-hut hiking', 'kayaking / canoeing', 'biking', 'snowshoe hiking', 'rock climbing', 'running', 'going to the beach', 'ski touring', 'horseback riding', 'cross-country skiing', 'rafting', 'photography', 'skiing', 'relaxing', 'ice climbing', 'stand-up paddleboarding (SUP)', 'paragliding', 'fishing', 'snorkeling', 'surfing', 'scuba diving', 'swimming', 'yoga'], 'scores': [0.9707403779029846, 0.9418103694915771, 0.7376925349235535, 0.7047153115272522, 0.6968525648117065, 0.6724464893341064, 0.6657483577728271, 0.639492392539978, 0.6352409720420837, 0.622490406036377, 0.6204463243484497, 0.5850474834442139, 0.5416201949119568, 0.5212154984474182, 0.4965360760688782, 0.47773101925849915, 0.4552563726902008, 0.4388185143470764, 0.36490294337272644, 0.35453176498413086, 0.3505079746246338, 0.34379279613494873, 0.33917883038520813, 0.29816576838493347, 0.22803360223770142]}\n", + "['hiking', 'sightseeing', 'hut-to-hut hiking', 'kayaking / canoeing', 'biking', 'snowshoe hiking', 'rock climbing', 'running', 'going to the beach', 'ski touring', 'horseback riding', 'cross-country skiing', 'rafting', 'photography']\n", + "1\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['cold destination / winter', 'warm destination / summer', 'variable weather / spring / autumn', 'dry / desert-like', 'tropical / humid', 'rainy climate'], 'scores': [0.21317142248153687, 0.19148282706737518, 0.1802588552236557, 0.1510961800813675, 0.1343575417995453, 0.12963321805000305]}\n", + "cold destination / winter\n", + "2\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['ultralight', 'minimalist', 'lightweight (but comfortable)', 'luxury (including evening wear)'], 'scores': [0.3694746792316437, 0.2801797389984131, 0.23808696866035461, 0.11225863546133041]}\n", + "ultralight\n", + "3\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['casual', 'formal (business trip)', 'conservative'], 'scores': [0.34530097246170044, 0.3344888389110565, 0.32021021842956543]}\n", + "casual\n", + "4\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['huts with half board', 'sleeping in a tent', 'sleeping in a car', 'indoor'], 'scores': [0.41636165976524353, 0.25336143374443054, 0.19501948356628418, 0.13525746762752533]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5455801486968994, 0.454419881105423]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['high alpine terrain', 'snow, ice and avalanche-prone terrain', 'self-supported (bring your own cooking gear)', 'snow and ice', 'no special conditions to consider', 'off-grid / no electricity', 'travel with children', 'pet-friendly'], 'scores': [0.23942454159259796, 0.17255951464176178, 0.14906182885169983, 0.12937109172344208, 0.10819944739341736, 0.07577616721391678, 0.065253347158432, 0.060354046523571014]}\n", + "high alpine terrain\n", + "7\n", + "{'sequence': 'I am going on a multiple day hike and passing though mountains and the beach in Croatia. I like to pack light and will stay in refugios/huts with half board and travel to the start of the hike by car. It will be 6-7 days.', 'labels': ['7+ days', '6 days', '7 days', '5 days', '4 days', '1 day', '2 days', '3 days'], 'scores': [0.22824247181415558, 0.218679741024971, 0.15772362053394318, 0.09058724343776703, 0.08163046836853027, 0.07612431794404984, 0.073652483522892, 0.07335961610078812]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type long-distance hike / thru-hike \n", + "1 activities [hiking, sightseeing, hut-to-hut hiking, kayak... \n", + "2 climate_or_season cold destination / winter \n", + "3 style_or_comfort ultralight \n", + "4 dress_code casual \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions high alpine terrain \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 long-distance hike / thru-hike \n", + "1 [going to the beach] \n", + "2 tropical / humid \n", + "3 minimalist \n", + "4 casual \n", + "5 huts with half board \n", + "6 own vehicle \n", + "7 off-grid / no electricity \n", + "8 6 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n", + "0 0.444444 1.000000 0.928571\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['beach vacation', 'micro-adventure / weekend trip', 'road trip (car/camper)', 'nature escape', 'cultural exploration', 'camping trip (wild camping)', 'long-distance hike / thru-hike', 'camping trip (campground)', 'festival trip', 'ski tour / skitour', 'snowboard / splitboard trip', 'hut trek (summer)', 'city trip', 'hut trek (winter)', 'digital nomad trip', 'yoga / wellness retreat'], 'scores': [0.23744942247867584, 0.10603270679712296, 0.06524186581373215, 0.06422917544841766, 0.06201164796948433, 0.0533960796892643, 0.05292251333594322, 0.04764849692583084, 0.04592280834913254, 0.044455721974372864, 0.04425935447216034, 0.042198047041893005, 0.03631977364420891, 0.034582093358039856, 0.03345293551683426, 0.029877403751015663]}\n", + "beach vacation\n", + "0\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['going to the beach', 'stand-up paddleboarding (SUP)', 'sightseeing', 'kayaking / canoeing', 'surfing', 'swimming', 'relaxing', 'rafting', 'fishing', 'scuba diving', 'biking', 'snorkeling', 'photography', 'hiking', 'hut-to-hut hiking', 'paragliding', 'running', 'ski touring', 'rock climbing', 'horseback riding', 'skiing', 'yoga', 'cross-country skiing', 'ice climbing', 'snowshoe hiking'], 'scores': [0.9471756219863892, 0.8122013211250305, 0.8093580603599548, 0.7983085513114929, 0.7912724018096924, 0.6105694770812988, 0.5944762229919434, 0.5742869973182678, 0.47236502170562744, 0.3782857060432434, 0.33895358443260193, 0.32937514781951904, 0.3061094880104065, 0.2849915027618408, 0.2622394263744354, 0.2508765459060669, 0.24640551209449768, 0.24543659389019012, 0.22789046168327332, 0.2231861650943756, 0.2161550670862198, 0.19668278098106384, 0.19172737002372742, 0.17304891347885132, 0.1477421224117279]}\n", + "['going to the beach', 'stand-up paddleboarding (SUP)', 'sightseeing', 'kayaking / canoeing', 'surfing', 'swimming', 'relaxing', 'rafting']\n", + "1\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['warm destination / summer', 'cold destination / winter', 'variable weather / spring / autumn', 'tropical / humid', 'rainy climate', 'dry / desert-like'], 'scores': [0.3070872128009796, 0.1844758838415146, 0.15898537635803223, 0.13669373095035553, 0.11911879479885101, 0.09363904595375061]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['ultralight', 'minimalist', 'luxury (including evening wear)', 'lightweight (but comfortable)'], 'scores': [0.28144413232803345, 0.2764531075954437, 0.23644311726093292, 0.20565970242023468]}\n", + "ultralight\n", + "3\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['conservative', 'casual', 'formal (business trip)'], 'scores': [0.358445405960083, 0.33785077929496765, 0.30370378494262695]}\n", + "conservative\n", + "4\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['sleeping in a tent', 'sleeping in a car', 'huts with half board', 'indoor'], 'scores': [0.3697204291820526, 0.2906339168548584, 0.20863069593906403, 0.1310148984193802]}\n", + "sleeping in a tent\n", + "5\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5295110940933228, 0.47048884630203247]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['no special conditions to consider', 'snow and ice', 'travel with children', 'self-supported (bring your own cooking gear)', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity', 'high alpine terrain', 'pet-friendly'], 'scores': [0.205083966255188, 0.13198444247245789, 0.13119913637638092, 0.12617307901382446, 0.11661110073328018, 0.10581637173891068, 0.0973207950592041, 0.08581113070249557]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'I will go with a friend on a beach holiday and we will do stand-up paddling, and surfing in the North of Spain. The destination is windy and can get cold, but is generally sunny. We will go by car and bring a tent to sleep in. It will be two weeks.', 'labels': ['7+ days', '7 days', '6 days', '2 days', '5 days', '4 days', '3 days', '1 day'], 'scores': [0.19788584113121033, 0.1333414614200592, 0.13238824903964996, 0.12004666030406952, 0.11875136196613312, 0.10994188487529755, 0.1035337820649147, 0.08411075174808502]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type beach vacation \n", + "1 activities [going to the beach, stand-up paddleboarding (... \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort ultralight \n", + "4 dress_code conservative \n", + "5 accommodation sleeping in a tent \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 beach vacation \n", + "1 [stand-up paddleboarding (SUP), surfing] \n", + "2 cold destination / winter \n", + "3 ultralight \n", + "4 casual \n", + "5 sleeping in a tent \n", + "6 own vehicle \n", + "7 off-grid / no electricity \n", + "8 6 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n", + "0 0.444444 1.000000 0.928571\n", + "0 0.444444 1.000000 0.750000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['yoga / wellness retreat', 'micro-adventure / weekend trip', 'nature escape', 'long-distance hike / thru-hike', 'cultural exploration', 'ski tour / skitour', 'hut trek (winter)', 'city trip', 'beach vacation', 'road trip (car/camper)', 'hut trek (summer)', 'festival trip', 'camping trip (wild camping)', 'snowboard / splitboard trip', 'camping trip (campground)', 'digital nomad trip'], 'scores': [0.2606178820133209, 0.08046605437994003, 0.06843063235282898, 0.059995006769895554, 0.059469204396009445, 0.05855844169855118, 0.055849116295576096, 0.047889091074466705, 0.045752931386232376, 0.04353173449635506, 0.04008011892437935, 0.038273148238658905, 0.03779057413339615, 0.03708784282207489, 0.03450765833258629, 0.03170054778456688]}\n", + "yoga / wellness retreat\n", + "0\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['yoga', 'relaxing', 'hiking', 'ski touring', 'sightseeing', 'snowshoe hiking', 'running', 'hut-to-hut hiking', 'skiing', 'going to the beach', 'kayaking / canoeing', 'cross-country skiing', 'swimming', 'ice climbing', 'biking', 'rafting', 'rock climbing', 'stand-up paddleboarding (SUP)', 'snorkeling', 'horseback riding', 'scuba diving', 'paragliding', 'photography', 'surfing', 'fishing'], 'scores': [0.8216512799263, 0.7652244567871094, 0.6132642030715942, 0.5138745307922363, 0.44325223565101624, 0.4208028316497803, 0.37471672892570496, 0.37093672156333923, 0.3666746914386749, 0.3648392856121063, 0.345426082611084, 0.3357292115688324, 0.3067779541015625, 0.3034307062625885, 0.2911964952945709, 0.25312700867652893, 0.24941785633563995, 0.23824645578861237, 0.2241792529821396, 0.213203564286232, 0.20734399557113647, 0.17350167036056519, 0.17043103277683258, 0.15861929953098297, 0.14433901011943817]}\n", + "['yoga', 'relaxing', 'hiking', 'ski touring']\n", + "1\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['cold destination / winter', 'variable weather / spring / autumn', 'warm destination / summer', 'tropical / humid', 'rainy climate', 'dry / desert-like'], 'scores': [0.36021333932876587, 0.19872936606407166, 0.1792670488357544, 0.0946045070886612, 0.09094184637069702, 0.07624392211437225]}\n", + "cold destination / winter\n", + "2\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['lightweight (but comfortable)', 'ultralight', 'minimalist', 'luxury (including evening wear)'], 'scores': [0.3093704581260681, 0.2733272314071655, 0.2592032551765442, 0.15809905529022217]}\n", + "lightweight (but comfortable)\n", + "3\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.40370842814445496, 0.3690830171108246, 0.22720862925052643]}\n", + "casual\n", + "4\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['indoor', 'sleeping in a tent', 'huts with half board', 'sleeping in a car'], 'scores': [0.2969803810119629, 0.26551374793052673, 0.22557803988456726, 0.21192780137062073]}\n", + "indoor\n", + "5\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5150290727615356, 0.48497089743614197]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['snow and ice', 'no special conditions to consider', 'snow, ice and avalanche-prone terrain', 'high alpine terrain', 'self-supported (bring your own cooking gear)', 'travel with children', 'off-grid / no electricity', 'pet-friendly'], 'scores': [0.17463071644306183, 0.16196538507938385, 0.14370520412921906, 0.13748210668563843, 0.11387145519256592, 0.1002817153930664, 0.09386476129293442, 0.07419868558645248]}\n", + "snow and ice\n", + "7\n", + "{'sequence': 'We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels.', 'labels': ['7+ days', '7 days', '6 days', '5 days', '1 day', '4 days', '2 days', '3 days'], 'scores': [0.16799123585224152, 0.12651269137859344, 0.12625618278980255, 0.11859724670648575, 0.11564400792121887, 0.11562533676624298, 0.11541663110256195, 0.11395667493343353]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type yoga / wellness retreat \n", + "1 activities [yoga, relaxing, hiking, ski touring] \n", + "2 climate_or_season cold destination / winter \n", + "3 style_or_comfort lightweight (but comfortable) \n", + "4 dress_code casual \n", + "5 accommodation indoor \n", + "6 transportation own vehicle \n", + "7 special_conditions snow and ice \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 yoga / wellness retreat \n", + "1 [hut-to-hut hiking, yoga] \n", + "2 cold destination / winter \n", + "3 lightweight (but comfortable) \n", + "4 formal (business trip) \n", + "5 sleeping in a tent \n", + "6 no own vehicle \n", + "7 avalanche-prone terrain \n", + "8 7 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n", + "0 0.444444 1.000000 0.928571\n", + "0 0.444444 1.000000 0.750000\n", + "0 0.333333 0.500000 0.750000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['ski tour / skitour', 'micro-adventure / weekend trip', 'cultural exploration', 'road trip (car/camper)', 'city trip', 'snowboard / splitboard trip', 'long-distance hike / thru-hike', 'digital nomad trip', 'hut trek (winter)', 'festival trip', 'hut trek (summer)', 'camping trip (wild camping)', 'nature escape', 'camping trip (campground)', 'beach vacation', 'yoga / wellness retreat'], 'scores': [0.1734267771244049, 0.09546443074941635, 0.08052344620227814, 0.07985977828502655, 0.06759097427129745, 0.06277172267436981, 0.054686594754457474, 0.05254476144909859, 0.0503639318048954, 0.044427838176488876, 0.043578390032052994, 0.043481748551130295, 0.04278255254030228, 0.04047577455639839, 0.038092684000730515, 0.029928630217909813]}\n", + "ski tour / skitour\n", + "0\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['ski touring', 'sightseeing', 'skiing', 'cross-country skiing', 'kayaking / canoeing', 'photography', 'snowshoe hiking', 'rafting', 'hiking', 'hut-to-hut hiking', 'relaxing', 'biking', 'paragliding', 'stand-up paddleboarding (SUP)', 'ice climbing', 'rock climbing', 'surfing', 'horseback riding', 'running', 'scuba diving', 'going to the beach', 'fishing', 'snorkeling', 'yoga', 'swimming'], 'scores': [0.8142338395118713, 0.7842962741851807, 0.6903234124183655, 0.6132006645202637, 0.5646158456802368, 0.5321369171142578, 0.4776653051376343, 0.47481176257133484, 0.4403829574584961, 0.4385501444339752, 0.43699926137924194, 0.424324631690979, 0.41724103689193726, 0.4036017656326294, 0.39129355549812317, 0.3776353597640991, 0.374114453792572, 0.3706415891647339, 0.3287637531757355, 0.3272634446620941, 0.31675824522972107, 0.30254125595092773, 0.30229055881500244, 0.21720251441001892, 0.20738299190998077]}\n", + "['ski touring', 'sightseeing', 'skiing', 'cross-country skiing', 'kayaking / canoeing', 'photography']\n", + "1\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['cold destination / winter', 'variable weather / spring / autumn', 'warm destination / summer', 'tropical / humid', 'dry / desert-like', 'rainy climate'], 'scores': [0.31022897362709045, 0.20760662853717804, 0.1636965423822403, 0.11239969730377197, 0.10346854478120804, 0.10259959101676941]}\n", + "cold destination / winter\n", + "2\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['minimalist', 'ultralight', 'lightweight (but comfortable)', 'luxury (including evening wear)'], 'scores': [0.3154253363609314, 0.27500393986701965, 0.2093629390001297, 0.20020779967308044]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['formal (business trip)', 'conservative', 'casual'], 'scores': [0.42883870005607605, 0.2967377007007599, 0.27442359924316406]}\n", + "formal (business trip)\n", + "4\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['huts with half board', 'indoor', 'sleeping in a tent', 'sleeping in a car'], 'scores': [0.268301784992218, 0.2666485011577606, 0.23450568318367004, 0.2305440604686737]}\n", + "huts with half board\n", + "5\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5153052806854248, 0.4846946895122528]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['snow, ice and avalanche-prone terrain', 'high alpine terrain', 'no special conditions to consider', 'snow and ice', 'self-supported (bring your own cooking gear)', 'travel with children', 'off-grid / no electricity', 'pet-friendly'], 'scores': [0.19052204489707947, 0.15655279159545898, 0.13949212431907654, 0.13879263401031494, 0.11442805081605911, 0.10863885283470154, 0.08574623614549637, 0.06582723557949066]}\n", + "snow, ice and avalanche-prone terrain\n", + "7\n", + "{'sequence': 'I go on a skitouring trip where we also make videos/photos and the destination is Japan. Mainly sports clothes and isolation are needed (it is winter). We stay in a guesthouse. It will be 10 days.', 'labels': ['7+ days', '7 days', '6 days', '5 days', '1 day', '4 days', '2 days', '3 days'], 'scores': [0.2278742790222168, 0.12380822747945786, 0.12119485437870026, 0.11229623854160309, 0.1085328683257103, 0.10332215577363968, 0.10219617187976837, 0.10077515244483948]}\n", + "7+ days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type ski tour / skitour \n", + "1 activities [ski touring, sightseeing, skiing, cross-count... \n", + "2 climate_or_season cold destination / winter \n", + "3 style_or_comfort minimalist \n", + "4 dress_code formal (business trip) \n", + "5 accommodation huts with half board \n", + "6 transportation own vehicle \n", + "7 special_conditions snow, ice and avalanche-prone terrain \n", + "8 trip_length_days 7+ days \n", + "\n", + " true_class \n", + "0 ski tour / skitour \n", + "1 [ski touring, photography, swimming] \n", + "2 cold destination / winter \n", + "3 minimalist \n", + "4 conservative \n", + "5 indoor \n", + "6 no own vehicle \n", + "7 avalanche-prone terrain \n", + "8 5 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n", + "0 0.444444 1.000000 0.928571\n", + "0 0.444444 1.000000 0.750000\n", + "0 0.333333 0.500000 0.750000\n", + "0 0.333333 0.666667 0.666667\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Hardware accelerator e.g. GPU is available in the environment, but no `device` argument is passed to the `Pipeline` object. Model will be on CPU.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['camping trip (wild camping)', 'camping trip (campground)', 'micro-adventure / weekend trip', 'road trip (car/camper)', 'nature escape', 'beach vacation', 'long-distance hike / thru-hike', 'cultural exploration', 'festival trip', 'ski tour / skitour', 'hut trek (summer)', 'city trip', 'hut trek (winter)', 'snowboard / splitboard trip', 'digital nomad trip', 'yoga / wellness retreat'], 'scores': [0.24850936233997345, 0.14938758313655853, 0.09667350351810455, 0.08339172601699829, 0.05508505925536156, 0.051402922719717026, 0.044685814529657364, 0.03972415253520012, 0.03578963875770569, 0.03319094330072403, 0.03277123346924782, 0.029747819527983665, 0.02797492779791355, 0.027441974729299545, 0.023192668333649635, 0.021030662581324577]}\n", + "camping trip (wild camping)\n", + "0\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['kayaking / canoeing', 'sightseeing', 'going to the beach', 'snorkeling', 'relaxing', 'hiking', 'rafting', 'hut-to-hut hiking', 'fishing', 'swimming', 'surfing', 'cross-country skiing', 'horseback riding', 'stand-up paddleboarding (SUP)', 'scuba diving', 'ski touring', 'rock climbing', 'photography', 'biking', 'skiing', 'snowshoe hiking', 'ice climbing', 'running', 'paragliding', 'yoga'], 'scores': [0.88539719581604, 0.8517834544181824, 0.6639761924743652, 0.6536601781845093, 0.6192843914031982, 0.5907655358314514, 0.5902426242828369, 0.5398754477500916, 0.522949755191803, 0.40187832713127136, 0.3998588025569916, 0.36464253067970276, 0.36373376846313477, 0.3598483204841614, 0.35947346687316895, 0.3562069237232208, 0.355800062417984, 0.34865936636924744, 0.32515498995780945, 0.3181168735027313, 0.31806549429893494, 0.3143276572227478, 0.2735307514667511, 0.2715666592121124, 0.17215368151664734]}\n", + "['kayaking / canoeing', 'sightseeing', 'going to the beach', 'snorkeling', 'relaxing', 'hiking', 'rafting', 'hut-to-hut hiking', 'fishing']\n", + "1\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['warm destination / summer', 'tropical / humid', 'variable weather / spring / autumn', 'dry / desert-like', 'cold destination / winter', 'rainy climate'], 'scores': [0.32865503430366516, 0.1498994529247284, 0.14973486959934235, 0.1377931833267212, 0.12470144778490067, 0.10921601951122284]}\n", + "warm destination / summer\n", + "2\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['minimalist', 'ultralight', 'lightweight (but comfortable)', 'luxury (including evening wear)'], 'scores': [0.3909915089607239, 0.22962640225887299, 0.21160008013248444, 0.1677819937467575]}\n", + "minimalist\n", + "3\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['casual', 'conservative', 'formal (business trip)'], 'scores': [0.37736961245536804, 0.3252304494380951, 0.29739996790885925]}\n", + "casual\n", + "4\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['sleeping in a tent', 'sleeping in a car', 'huts with half board', 'indoor'], 'scores': [0.42764899134635925, 0.22646835446357727, 0.18703599274158478, 0.1588466912508011]}\n", + "sleeping in a tent\n", + "5\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['own vehicle', 'no own vehicle'], 'scores': [0.5207383036613464, 0.47926169633865356]}\n", + "own vehicle\n", + "6\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['no special conditions to consider', 'self-supported (bring your own cooking gear)', 'travel with children', 'high alpine terrain', 'snow and ice', 'snow, ice and avalanche-prone terrain', 'off-grid / no electricity', 'pet-friendly'], 'scores': [0.16231811046600342, 0.15695218741893768, 0.1284862905740738, 0.12074963748455048, 0.11439701169729233, 0.11109456419944763, 0.10983186215162277, 0.09617031365633011]}\n", + "no special conditions to consider\n", + "7\n", + "{'sequence': 'We plan a wild camping trip with activities such as snorkeling, kayaking and canoeing. It is a warm place and we want to bring little stuff. We stay in tents and hammocks and travel with a car, it will be 3 days.', 'labels': ['3 days', '7+ days', '2 days', '4 days', '6 days', '1 day', '7 days', '5 days'], 'scores': [0.3021169900894165, 0.10651747137308121, 0.10220468044281006, 0.10134027898311615, 0.10006321221590042, 0.09801313281059265, 0.09622228145599365, 0.09352197498083115]}\n", + "3 days\n", + "8\n", + " superclass pred_class \\\n", + "0 activity_type camping trip (wild camping) \n", + "1 activities [kayaking / canoeing, sightseeing, going to th... \n", + "2 climate_or_season warm destination / summer \n", + "3 style_or_comfort minimalist \n", + "4 dress_code casual \n", + "5 accommodation sleeping in a tent \n", + "6 transportation own vehicle \n", + "7 special_conditions no special conditions to consider \n", + "8 trip_length_days 3 days \n", + "\n", + " true_class \n", + "0 camping trip (wild camping) \n", + "1 [scuba diving, kayaking / canoeing] \n", + "2 tropical / humid \n", + "3 lightweight (but comfortable) \n", + "4 conservative \n", + "5 sleeping in a tent \n", + "6 own vehicle \n", + "7 no special conditions to consider \n", + "8 3 days \n", + " accuracy true_ident false_pred\n", + "0 0.333333 0.500000 0.333333\n", + "0 0.333333 1.000000 0.000000\n", + "0 0.333333 0.000000 NaN\n", + "0 0.222222 0.666667 0.000000\n", + "0 0.222222 0.666667 0.666667\n", + "0 0.444444 1.000000 0.928571\n", + "0 0.444444 1.000000 0.750000\n", + "0 0.333333 0.500000 0.750000\n", + "0 0.333333 0.666667 0.666667\n", + "0 0.555556 0.500000 0.888889\n", + " superclass same_value same_value same_value same_value \\\n", + "0 activity_type False True False True \n", + "1 activities False True False False \n", + "2 climate_or_season True False True False \n", + "3 style_or_comfort False False False False \n", + "4 dress_code False False False False \n", + "5 accommodation False False False False \n", + "6 transportation False False False False \n", + "7 special_conditions True True True False \n", + "8 trip_length_days True True True True \n", + "\n", + " same_value same_value same_value same_value same_value same_value \n", + "0 False True True True True True \n", + "1 False False False False False False \n", + "2 True False False True True False \n", + "3 False False True True True False \n", + "4 False True False False False False \n", + "5 False True True False False True \n", + "6 False True True False False True \n", + "7 False False False False False True \n", + "8 True False False False False True \n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.1\n", + "2 climate_or_season 0.5\n", + "3 style_or_comfort 0.3\n", + "4 dress_code 0.1\n", + "5 accommodation 0.3\n", + "6 transportation 0.3\n", + "7 special_conditions 0.4\n", + "8 trip_length_days 0.6\n", + "accuracy 0.355556\n", + "true_ident 0.650000\n", + "false_pred 0.553792\n", + "dtype: float64\n" + ] + } + ], + "source": [ + "# List of Hugging Face model names\n", + "model_names = [\n", + " \"facebook/bart-large-mnli\",\n", + " \"MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli\",\n", + " ##\"cross-encoder/nli-deberta-v3-base\",\n", + " \"cross-encoder/nli-deberta-v3-large\",\n", + " \"MoritzLaurer/mDeBERTa-v3-base-mnli-xnli\",\n", + " ##\"joeddav/bart-large-mnli-yahoo-answers\",\n", + " \"MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli\",\n", + " \"MoritzLaurer/deberta-v3-large-zeroshot-v2.0\",\n", + " \"valhalla/distilbart-mnli-12-1\",\n", + " #\"joeddav/xlm-roberta-large-xnli\" # keeps giving errors\n", + "]\n", + "\n", + "# Apply each model to the test data\n", + "for model_name in model_names:\n", + " print(f\"\\nUsing model: {model_name}\")\n", + " result_list = []\n", + " performance = pd.DataFrame(columns=['accuracy', 'true_ident', 'false_pred'])\n", + " \n", + " start_time = time.time()\n", + " for i in range(len(trip_descriptions)):\n", + " current_trip = trip_descriptions[i]\n", + " current_type = trip_types[i]\n", + " df = pred_trip(model_name, current_trip, current_type, cut_off = 0.5)\n", + " print(df)\n", + " # accuracy, perc true classes identified and perc wrong pred classes\n", + " performance = pd.concat([performance, perf_measure(df)])\n", + " print(performance)\n", + " \n", + " result_list.append(df)\n", + " end_time = time.time()\n", + " elapsed_time = end_time - start_time\n", + " # Extract \"same_value\" column from each DataFrame\n", + " sv_columns = [df['same_value'] for df in result_list] # 'same' needs to be changed\n", + " sv_columns.insert(0, result_list[0]['superclass'])\n", + " # Combine into a new DataFrame (columns side-by-side)\n", + " sv_df = pd.concat(sv_columns, axis=1)\n", + " print(sv_df)\n", + " # Compute accuracy per superclass (row means of same_value matrix excluding the first column)\n", + " row_means = sv_df.iloc[:, 1:].mean(axis=1)\n", + " df_row_means = pd.DataFrame({\n", + " 'superclass': sv_df['superclass'],\n", + " 'accuracy': row_means\n", + " })\n", + " print(df_row_means)\n", + " # Compute performance measures per trip (mean for each column of performance table)\n", + " column_means = performance.mean()\n", + " print(column_means)\n", + " # save results\n", + " model = model_name.replace(\"/\", \"-\")\n", + " model_result = {\n", + " 'model': model,\n", + " 'predictions': result_list,\n", + " 'performance': performance,\n", + " 'perf_summary': column_means,\n", + " 'perf_superclass': df_row_means,\n", + " 'elapsed_time': elapsed_time\n", + " }\n", + " # File path with folder\n", + " filename = os.path.join('results', f'{model}_results.pkl')\n", + " # Save the object\n", + " with open(filename, 'wb') as f:\n", + " pickle.dump(model_result, f)\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "e1cbb54e-abe6-49b6-957e-0683196f3199", + "metadata": {}, + "source": [ + "## Load and compare results" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "62ca82b0-6909-4e6c-9d2c-fed87971e5b6", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Model: cross-encoder-nli-deberta-v3-base\n", + "Performance Summary:\n", + "accuracy 0.444444\n", + "true_ident 0.533333\n", + "false_pred 0.712500\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: joeddav-bart-large-mnli-yahoo-answers\n", + "Performance Summary:\n", + "accuracy 0.344444\n", + "true_ident 0.650000\n", + "false_pred 0.553792\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: cross-encoder-nli-deberta-v3-large\n", + "Performance Summary:\n", + "accuracy 0.466667\n", + "true_ident 0.566667\n", + "false_pred 0.541667\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: MoritzLaurer-DeBERTa-v3-large-mnli-fever-anli-ling-wanli\n", + "Performance Summary:\n", + "accuracy 0.566667\n", + "true_ident 0.841667\n", + "false_pred 0.546667\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: MoritzLaurer-mDeBERTa-v3-base-mnli-xnli\n", + "Performance Summary:\n", + "accuracy 0.466667\n", + "true_ident 0.408333\n", + "false_pred 0.481250\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: MoritzLaurer-deberta-v3-large-zeroshot-v2.0\n", + "Performance Summary:\n", + "accuracy 0.455556\n", + "true_ident 0.325000\n", + "false_pred 0.500000\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: facebook-bart-large-mnli\n", + "Performance Summary:\n", + "accuracy 0.466667\n", + "true_ident 0.708333\n", + "false_pred 0.400000\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: valhalla-distilbart-mnli-12-1\n", + "Performance Summary:\n", + "accuracy 0.522222\n", + "true_ident 0.300000\n", + "false_pred 0.533333\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\n", + "Performance Summary:\n", + "accuracy 0.522222\n", + "true_ident 0.841667\n", + "false_pred 0.572381\n", + "dtype: float64\n", + "----------------------------------------\n", + "Model: cross-encoder-nli-deberta-v3-base\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.0\n", + "2 climate_or_season 0.4\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.6\n", + "6 transportation 0.6\n", + "7 special_conditions 0.0\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: joeddav-bart-large-mnli-yahoo-answers\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.1\n", + "2 climate_or_season 0.5\n", + "3 style_or_comfort 0.3\n", + "4 dress_code 0.1\n", + "5 accommodation 0.3\n", + "6 transportation 0.3\n", + "7 special_conditions 0.3\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: cross-encoder-nli-deberta-v3-large\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.6\n", + "1 activities 0.1\n", + "2 climate_or_season 0.5\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.7\n", + "6 transportation 0.4\n", + "7 special_conditions 0.3\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: MoritzLaurer-DeBERTa-v3-large-mnli-fever-anli-ling-wanli\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.8\n", + "1 activities 0.0\n", + "2 climate_or_season 0.7\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.8\n", + "6 transportation 0.9\n", + "7 special_conditions 0.2\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: MoritzLaurer-mDeBERTa-v3-base-mnli-xnli\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.9\n", + "1 activities 0.0\n", + "2 climate_or_season 0.6\n", + "3 style_or_comfort 0.5\n", + "4 dress_code 0.6\n", + "5 accommodation 0.3\n", + "6 transportation 0.8\n", + "7 special_conditions 0.1\n", + "8 trip_length_days 0.4\n", + "----------------------------------------\n", + "Model: MoritzLaurer-deberta-v3-large-zeroshot-v2.0\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.0\n", + "2 climate_or_season 0.5\n", + "3 style_or_comfort 0.3\n", + "4 dress_code 0.7\n", + "5 accommodation 0.5\n", + "6 transportation 0.8\n", + "7 special_conditions 0.0\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: facebook-bart-large-mnli\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.8\n", + "1 activities 0.0\n", + "2 climate_or_season 0.6\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.3\n", + "6 transportation 0.8\n", + "7 special_conditions 0.0\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n", + "Model: valhalla-distilbart-mnli-12-1\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.7\n", + "1 activities 0.1\n", + "2 climate_or_season 0.6\n", + "3 style_or_comfort 0.4\n", + "4 dress_code 0.7\n", + "5 accommodation 0.4\n", + "6 transportation 0.9\n", + "7 special_conditions 0.3\n", + "8 trip_length_days 0.7\n", + "----------------------------------------\n", + "Model: MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\n", + "Performance Summary:\n", + " superclass accuracy\n", + "0 activity_type 0.8\n", + "1 activities 0.0\n", + "2 climate_or_season 0.5\n", + "3 style_or_comfort 0.3\n", + "4 dress_code 0.8\n", + "5 accommodation 0.8\n", + "6 transportation 0.7\n", + "7 special_conditions 0.2\n", + "8 trip_length_days 0.6\n", + "----------------------------------------\n" + ] + } + ], + "source": [ + "# Folder where .pkl files are saved\n", + "results_dir = 'results/before'\n", + "\n", + "# Dictionary to store all loaded results\n", + "all_results = {}\n", + "\n", + "# Loop through all .pkl files in the folder\n", + "for filename in os.listdir(results_dir):\n", + " if filename.endswith('.pkl'):\n", + " model_name = filename.replace('_results.pkl', '') # Extract model name\n", + " file_path = os.path.join(results_dir, filename)\n", + " \n", + " # Load the result\n", + " with open(file_path, 'rb') as f:\n", + " result = pickle.load(f)\n", + " all_results[model_name] = result\n", + "\n", + "# Compare performance across models\n", + "for model, data in all_results.items():\n", + " print(f\"Model: {model}\")\n", + " print(f\"Performance Summary:\\n{data['perf_summary']}\")\n", + " print(\"-\" * 40)\n", + "\n", + "# Compare performance across models\n", + "for model, data in all_results.items():\n", + " print(f\"Model: {model}\")\n", + " print(f\"Performance Summary:\\n{data['perf_superclass']}\")\n", + " print(\"-\" * 40)" + ] + }, + { + "cell_type": "markdown", + "id": "2f65e5b1-bc32-42c2-bbe9-9e3a6ffc72c1", + "metadata": {}, + "source": [ + "**Identify trips that are difficult to predict**" + ] + }, + { + "cell_type": "markdown", + "id": "040055c9-5df4-49b0-921a-5bf98ff01a69", + "metadata": {}, + "source": [ + "Per model" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "57fd150d-1cda-4be5-806b-ef380469243a", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cross-encoder-nli-deberta-v3-base: Index([0, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64')\n", + "\n", + "joeddav-bart-large-mnli-yahoo-answers: RangeIndex(start=0, stop=10, step=1)\n", + "\n", + "cross-encoder-nli-deberta-v3-large: Index([0, 1, 2, 3, 4, 6, 7, 8, 9], dtype='int64')\n", + "\n", + "MoritzLaurer-DeBERTa-v3-large-mnli-fever-anli-ling-wanli: Index([2, 5, 6, 7, 8, 9], dtype='int64')\n", + "\n", + "MoritzLaurer-mDeBERTa-v3-base-mnli-xnli: RangeIndex(start=0, stop=10, step=1)\n", + "\n", + "MoritzLaurer-deberta-v3-large-zeroshot-v2.0: Index([0, 1, 2, 3, 4, 5, 6, 7, 9], dtype='int64')\n", + "\n", + "facebook-bart-large-mnli: RangeIndex(start=0, stop=10, step=1)\n", + "\n", + "valhalla-distilbart-mnli-12-1: Index([0, 1, 2, 3, 4, 7, 9], dtype='int64')\n", + "\n", + "MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli: Index([0, 2, 3, 4, 6, 7], dtype='int64')\n", + "\n" + ] + } + ], + "source": [ + "def get_difficult_trips(model_result, cut_off = 0.6):\n", + " # model_result is a dict with dict_keys(['model', 'predictions', \n", + " # 'performance', 'perf_summary', 'perf_superclass', 'elapsed_time'])\n", + " # get performance dataframe and repair index\n", + " df = model_result['performance'].reset_index(drop=True)\n", + " # find index of trips whose accuracy is below cut_off\n", + " index_result = df[df['accuracy'] < cut_off].index\n", + " return(index_result)\n", + "\n", + "# dictionary of trips that have accuracy below cut_off default\n", + "difficult_trips_dict = {}\n", + "for model, data in all_results.items():\n", + " difficult_trips_dict[data[\"model\"]] = get_difficult_trips(data)\n", + "\n", + "for key, value in difficult_trips_dict.items():\n", + " print(f\"{key}: {value}\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "d91fb932-c5aa-472a-9b8d-a0cfc83a87f8", + "metadata": {}, + "source": [ + "For all models" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "a2754cb7-59b9-4f1d-ab74-1bf711b3eba2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2 . My partner and I are traveling to the Netherlands and Germany to spend Christmas with our family. We are in our late twenties and will start our journey with a two-hour flight to the Netherlands. From there, we will take a 5.5-hour train ride to northern Germany. \n", + "\n", + "city trip\n", + "['relaxing']\n", + "cold destination / winter\n", + "lightweight (but comfortable)\n", + "casual\n", + "indoor\n", + "no own vehicle\n", + "no special conditions to consider\n", + "7+ days\n", + "\n", + "\n", + "7 . We will go to Sweden in the winter, to go for a yoga and sauna/wellness retreat. I prefer lightweight packing and also want clothes to go for fancy dinners and maybe on a winter hike. We stay in hotels. \n", + "\n", + "yoga / wellness retreat\n", + "['hut-to-hut hiking', 'yoga']\n", + "cold destination / winter\n", + "lightweight (but comfortable)\n", + "formal (business trip)\n", + "sleeping in a tent\n", + "no own vehicle\n", + "avalanche-prone terrain\n", + "7 days\n", + "\n", + "\n" + ] + } + ], + "source": [ + "# Which trips are difficult for all models\n", + "common = set.intersection(*(set(v) for v in difficult_trips_dict.values()))\n", + "for index in common:\n", + " print(index, \".\", trip_descriptions[index], \"\\n\")\n", + " for item in trip_types[index]:\n", + " print(item)\n", + " print(\"\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "be58d66f-a491-4f47-98df-2c0aa4af38e7", + "metadata": {}, + "source": [ + "**Identify superclasses that are difficult to predict**" + ] + }, + { + "cell_type": "markdown", + "id": "7e833c2d-9356-4d40-9b20-0a1eb6628a30", + "metadata": {}, + "source": [ + "Per model" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "adb491b1-3ac3-4c32-934f-5eb6171f2ec9", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cross-encoder-nli-deberta-v3-base: ['activities', 'climate_or_season', 'style_or_comfort', 'special_conditions']\n", + "\n", + "joeddav-bart-large-mnli-yahoo-answers: ['activities', 'climate_or_season', 'style_or_comfort', 'dress_code', 'accommodation', 'transportation', 'special_conditions']\n", + "\n", + "cross-encoder-nli-deberta-v3-large: ['activities', 'climate_or_season', 'style_or_comfort', 'transportation', 'special_conditions']\n", + "\n", + "MoritzLaurer-DeBERTa-v3-large-mnli-fever-anli-ling-wanli: ['activities', 'style_or_comfort', 'special_conditions']\n", + "\n", + "MoritzLaurer-mDeBERTa-v3-base-mnli-xnli: ['activities', 'style_or_comfort', 'accommodation', 'special_conditions', 'trip_length_days']\n", + "\n", + "MoritzLaurer-deberta-v3-large-zeroshot-v2.0: ['activities', 'climate_or_season', 'style_or_comfort', 'accommodation', 'special_conditions']\n", + "\n", + "facebook-bart-large-mnli: ['activities', 'style_or_comfort', 'accommodation', 'special_conditions']\n", + "\n", + "valhalla-distilbart-mnli-12-1: ['activities', 'style_or_comfort', 'accommodation', 'special_conditions']\n", + "\n", + "MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli: ['activities', 'climate_or_season', 'style_or_comfort', 'special_conditions']\n", + "\n" + ] + } + ], + "source": [ + "def get_difficult_superclasses(model_result, cut_off = 0.6):\n", + " # model_result is a dict with dict_keys(['model', 'predictions', \n", + " # 'performance', 'perf_summary', 'perf_superclass', 'elapsed_time'])\n", + " df = model_result[\"perf_superclass\"]\n", + " # find superclass whose accuracy is below cut_off\n", + " diff_spc = list(df[df['accuracy'] < cut_off][\"superclass\"])\n", + " return(diff_spc)\n", + "\n", + "# make dictionary of superclasses that have accuracy below cut_off default\n", + "difficult_superclass_dict = {}\n", + "for model, data in all_results.items():\n", + " difficult_superclass_dict[data[\"model\"]] = get_difficult_superclasses(data)\n", + "\n", + "for key, value in difficult_superclass_dict.items():\n", + " print(f\"{key}: {value}\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "fbcebdf8-0975-45cb-96f5-15b4645aa7f6", + "metadata": {}, + "source": [ + "For all models" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "4e51c11b-9a0a-4f9d-b20c-a6feda2d5a3b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'style_or_comfort', 'activities', 'special_conditions'}\n" + ] + } + ], + "source": [ + "# Which trips are difficult for all models\n", + "common = set.intersection(*(set(v) for v in difficult_superclass_dict.values()))\n", + "print(common)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "f0e31e2c-e87d-4776-b781-991919492430", + "metadata": {}, + "outputs": [], + "source": [ + "# Look at particular predicitons in detail\n", + "# print(all_results[\"joeddav-bart-large-mnli-yahoo-answers\"])" + ] + }, + { + "cell_type": "markdown", + "id": "01e24355-4aac-4ad6-b50c-96f75585ce45", + "metadata": {}, + "source": [ + "**Comparing models**" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "b020f584-1468-4c84-9dac-7ca7fac6e8ca", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "dict_keys(['model', 'predictions', 'performance', 'perf_summary', 'perf_superclass', 'elapsed_time'])\n", + "\n", + "accuracy 0.522222\n", + "true_ident 0.841667\n", + "false_pred 0.572381\n", + "dtype: float64\n", + "0.5222222222222223\n" + ] + } + ], + "source": [ + "# Make table of 'perf_summary' for all models inlcude time elapsed\n", + "print(type(all_results))\n", + "print(type(all_results[\"MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\"]))\n", + "print(all_results[\"MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\"].keys())\n", + "print(type(all_results[\"MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\"][\"perf_summary\"]))\n", + "print(all_results[\"MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\"][\"perf_summary\"])\n", + "print(all_results[\"MoritzLaurer-DeBERTa-v3-base-mnli-fever-anli\"][\"perf_summary\"][\"accuracy\"])\n", + "# make empty data frame\n", + "# fill in for loop with perf_summary per model\n", + "\n", + "\n", + "# Make ranking from that table for each category\n" + ] + }, + { + "cell_type": "markdown", + "id": "17483df4-55c4-41cd-b8a9-61f7a5c7e8a3", + "metadata": {}, + "source": [ + "# Use gradio for user input" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "id": "cb7fd425-d0d6-458d-97ca-2150dc55f206", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running on local URL: http://127.0.0.1:7861\n", + "Running on public URL: https://aa06d5d85ffadaa92b.gradio.live\n", + "\n", + "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n", + "7\n", + "8\n", + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n", + "7\n", + "8\n" + ] + } + ], + "source": [ + "# use model with gradio\n", + "from transformers import pipeline\n", + "import gradio as gr\n", + "\n", + "# make a function for what I am doing\n", + "def classify(text):\n", + " df = pd.DataFrame(columns=['Superclass', 'class'])\n", + " for i, key in enumerate(keys_list):\n", + " # Run the classification (ca 30 seconds classifying)\n", + " if key == 'activities':\n", + " result = classifier(text, candidate_labels[key], multi_label=True)\n", + " classes = [result['labels'][i] for i in indices]\n", + " else:\n", + " result = classifier(text, candidate_labels[key])\n", + " classes = result[\"labels\"][0]\n", + " print(i)\n", + " df.loc[i] = [key, classes]\n", + "\n", + " return df\n", + "\n", + "demo = gr.Interface(\n", + " fn=classify,\n", + " inputs=\"text\",\n", + " outputs=\"dataframe\",\n", + " title=\"Zero-Shot Classification\",\n", + " description=\"Enter a text describing your trip\",\n", + ")\n", + "\n", + "# Launch the Gradio app\n", + "if __name__ == \"__main__\":\n", + " demo.launch(share=True)" + ] + }, + { + "cell_type": "markdown", + "id": "8e856a9c-a66c-4c4b-b7cf-8c52abbbc6fa", + "metadata": {}, + "source": [ + "Use model with gradio" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "521d9118-b59d-4cc6-b637-20202eaf8f33", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running on local URL: http://127.0.0.1:7861\n", + "Running on public URL: https://0f70ba5369d721cf8f.gradio.live\n", + "\n", + "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Define the Gradio interface\n", + "def classify(text):\n", + " return classifier(text, class_labels)\n", + "\n", + "demo = gr.Interface(\n", + " fn=classify,\n", + " inputs=\"text\",\n", + " outputs=\"json\",\n", + " title=\"Zero-Shot Classification\",\n", + " description=\"Enter a text describing your trip\",\n", + ")\n", + "\n", + "# Launch the Gradio app\n", + "if __name__ == \"__main__\":\n", + " demo.launch(share=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c8da1c90-d3a3-4b08-801c-b3afa17b2633", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python (huggingface_env)", + "language": "python", + "name": "huggingface_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.20" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}