.DataAugmentationCategorify

struct defined in module DataAugmentation


			Categorify(dict, cols)

Label encodes the values of a row present in TabularItem for the columns specified in cols using dict, which contains the column names as dictionary keys and the unique values of column present as dictionary values.

if there are any missing values in the values to be transformed, they are replaced by 1.

Example


			
			
			
			using
			
			 

	
			DataAugmentation
			

			

			
			cols
			 
			=
			 
			
			[
			
			:
			col1
			,
			 
			
			:
			col2
			,
			 
			
			:
			col3
			]
			

			
			row
			 
			=
			 
			
			(
			
			;
			 
			
			
			zip
			(
			cols
			,
			 
			
			[
			
			"
			cat
			"
			,
			 
			2
			,
			 
			3
			]
			)
			...
			)
			

			
			item
			 
			=
			 
			

	
			TabularItem
			(
			row
			,
			 
			cols
			)
			

			
			catdict
			 
			=
			 
			
			Dict
			(
			
			
			:
			col1
			 
			=>
			 
			
			[
			
			"
			dog
			"
			,
			 
			
			"
			cat
			"
			]
			)
			

			

			
			tfm
			 
			=
			 
			

			Categorify
			(
			catdict
			,
			 
			
			[
			
			:
			col1
			]
			)
			

			

	
			apply
			(
			tfm
			,
			 
			item
			)
Methods

There is 1 method for DataAugmentation.Categorify: