It is important for maritime authorities to effectively classify and identify unknown types of ships in historical trajectory data. This paper uses a logistic regression model to construct a ship classifier by utilising the features extracted from ship trajectories. First of all, three basic movement patterns are proposed according to ship sailing characteristics, with related sub-trajectory partitioning algorithms. Subsequently, three categories of trajectory features with their extraction methods are presented. Finally, a case study on building a model for classifying fishing boats and cargo ships based on real Automatic Identification System (AIS) data is given. Experimental results indicate that the proposed classification method can meet the needs of recognising uncertain types of targets in historical trajectory data, laying a foundation for further research on camouflaged ship identification, behaviour pattern mining, outlier behaviour detection and other applications.