h2o-py/h2o/estimators/word2vec.py
def _determine_vec_size(self):
        """
        Determines vec_size for a pre-trained model after basic model verification.
        """
        first_column = self.pre_trained.types[self.pre_trained.columns[0]]

        if first_column != 'string':
            raise H2OValueError("First column of given pre_trained model %s is required to be a String",
                                self.pre_trained.frame_id)

        if list(self.pre_trained.types.values()).count('string') > 1:
            raise H2OValueError("There are multiple columns in given pre_trained model %s with a String type.",
                                self.pre_trained.frame_id)

        self.vec_size = self.pre_trained.dim[1] - 1;
def _determine_vec_size(self):
        first_column = self.pre_trained.types[self.pre_trained.columns[0]]

        if first_column != 'string':
            raise H2OValueError("First column of given pre_trained model %s is required to be a String",
                                self.pre_trained.frame_id)

        if list(self.pre_trained.types.values()).count('string') > 1:
            raise H2OValueError("There are multiple columns in given pre_trained model %s with a String type.",
                                self.pre_trained.frame_id)

        self.vec_size = self.pre_trained.dim[1] - 1;
def _determine_vec_size ( self ) : first_column = self . pre_trained . types [ self . pre_trained . columns [ 0 ] ] if first_column != 'string' : raise H2OValueError ( "First column of given pre_trained model %s is required to be a String" , self . pre_trained . frame_id ) if list ( self . pre_trained . types . values ( ) ) . count ( 'string' ) > 1 : raise H2OValueError ( "There are multiple columns in given pre_trained model %s with a String type." , self . pre_trained . frame_id ) self . vec_size = self . pre_trained . dim [ 1 ] - 1
Determines vec_size for a pre-trained model after basic model verification.
Determines vec_size for a pre - trained model after basic model verification .