The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Is it possible to predict two categories from one label?
I'm new to this software and was wondering if this is possible or if it only categorizes it to the closest category.
For example, if I have a raw line written like: "My brother likes oranges as well as bananas" and I have the categories Orange, Banana, Apple and Pear.
Is it possible to categorize this into Orange as well as Banana?
For example, if I have a raw line written like: "My brother likes oranges as well as bananas" and I have the categories Orange, Banana, Apple and Pear.
Is it possible to categorize this into Orange as well as Banana?
Tagged:
0
Best Answer
-
IngoRM Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM FounderHi,You could look at the confidence values and extract the top N predictions from those. Or you could simply use the operator "Generate Prediction Ranks" which is doing exactly that for a given number of desired classes. The process below shows a simple example.Hope this helps,Ingo
<?xml version="1.0" encoding="UTF-8"?><process version="9.2.000"><br> <context><br> <input/><br> <output/><br> <macros/><br> </context><br> <operator activated="true" class="process" compatibility="9.2.000" expanded="true" name="Process"><br> <parameter key="logverbosity" value="init"/><br> <parameter key="random_seed" value="2001"/><br> <parameter key="send_mail" value="never"/><br> <parameter key="notification_email" value=""/><br> <parameter key="process_duration_for_mail" value="30"/><br> <parameter key="encoding" value="UTF-8"/><br> <process expanded="true"><br> <operator activated="true" class="retrieve" compatibility="9.2.000" expanded="true" height="68" name="Retrieve Titanic Training" width="90" x="45" y="34"><br> <parameter key="repository_entry" value="//Samples/data/Titanic Training"/><br> </operator><br> <operator activated="true" class="select_attributes" compatibility="9.2.000" expanded="true" height="82" name="Select Attributes" width="90" x="179" y="34"><br> <parameter key="attribute_filter_type" value="single"/><br> <parameter key="attribute" value="Survived"/><br> <parameter key="attributes" value=""/><br> <parameter key="use_except_expression" value="false"/><br> <parameter key="value_type" value="attribute_value"/><br> <parameter key="use_value_type_exception" value="false"/><br> <parameter key="except_value_type" value="time"/><br> <parameter key="block_type" value="attribute_block"/><br> <parameter key="use_block_type_exception" value="false"/><br> <parameter key="except_block_type" value="value_matrix_row_start"/><br> <parameter key="invert_selection" value="true"/><br> <parameter key="include_special_attributes" value="true"/><br> </operator><br> <operator activated="true" class="set_role" compatibility="9.2.000" expanded="true" height="82" name="Set Role" width="90" x="313" y="34"><br> <parameter key="attribute_name" value="Passenger Class"/><br> <parameter key="target_role" value="label"/><br> <list key="set_additional_roles"/><br> </operator><br> <operator activated="true" class="naive_bayes" compatibility="9.2.000" expanded="true" height="82" name="Naive Bayes" width="90" x="447" y="34"><br> <parameter key="laplace_correction" value="true"/><br> </operator><br> <operator activated="true" class="retrieve" compatibility="9.2.000" expanded="true" height="68" name="Retrieve Titanic Unlabeled" width="90" x="313" y="136"><br> <parameter key="repository_entry" value="//Samples/data/Titanic Unlabeled"/><br> </operator><br> <operator activated="true" class="set_role" compatibility="9.2.000" expanded="true" height="82" name="Set Role (2)" width="90" x="447" y="136"><br> <parameter key="attribute_name" value="Passenger Class"/><br> <parameter key="target_role" value="label"/><br> <list key="set_additional_roles"/><br> </operator><br> <operator activated="true" class="apply_model" compatibility="9.2.000" expanded="true" height="82" name="Apply Model" width="90" x="581" y="34"><br> <list key="application_parameters"/><br> <parameter key="create_view" value="false"/><br> </operator><br> <operator activated="true" class="generate_prediction_ranking" compatibility="9.2.000" expanded="true" height="82" name="Generate Prediction Ranking" width="90" x="715" y="34"><br> <parameter key="number_of_ranks" value="2"/><br> <parameter key="remove_old_predictions" value="true"/><br> </operator><br> <connect from_op="Retrieve Titanic Training" from_port="output" to_op="Select Attributes" to_port="example set input"/><br> <connect from_op="Select Attributes" from_port="example set output" to_op="Set Role" to_port="example set input"/><br> <connect from_op="Set Role" from_port="example set output" to_op="Naive Bayes" to_port="training set"/><br> <connect from_op="Naive Bayes" from_port="model" to_op="Apply Model" to_port="model"/><br> <connect from_op="Retrieve Titanic Unlabeled" from_port="output" to_op="Set Role (2)" to_port="example set input"/><br> <connect from_op="Set Role (2)" from_port="example set output" to_op="Apply Model" to_port="unlabelled data"/><br> <connect from_op="Apply Model" from_port="labelled data" to_op="Generate Prediction Ranking" to_port="example set input"/><br> <connect from_op="Generate Prediction Ranking" from_port="example set output" to_port="result 1"/><br> <portSpacing port="source_input 1" spacing="0"/><br> <portSpacing port="sink_result 1" spacing="0"/><br> <portSpacing port="sink_result 2" spacing="0"/><br> </process><br> </operator><br></process>
5
Answers